Fix some comments. 79/324079/1
authorMichal Bloch <m.bloch@samsung.com>
Fri, 9 May 2025 16:30:06 +0000 (18:30 +0200)
committerMichal Bloch <m.bloch@samsung.com>
Fri, 9 May 2025 16:30:06 +0000 (18:30 +0200)
Change-Id: Id1139f2484a6d5aed991e6d2425d4f32cd6d771d

src/service/src/main_restore.cpp
src/service/src/plugin_push.cpp

index fbd8b3f09c3be7a1cd05908a910015c2082fefe6..6d431e268d52673d9420959132cf1af3def13591 100644 (file)
@@ -90,7 +90,14 @@ static void restore_user_session(const fs::path& user_home_dir)
                std::ifstream(get_last_subsession_path_by_user_id(uid), std::ios::in) >> last_subsession;
        } catch (const std::exception &ex) {
                LOGE("Could not retrieve last subsession of user %s (uid %d)", username.c_str(), uid);
-               return; // FIXME the file not existing is actually fine (1st run) but actual errors are probably not
+
+               /* Don't rethrow since the most common errors are fine:
+                *  - name doesn't necessarily map to an existing UID,
+                *    this can happen e.g. when you install debug rpm
+                *    packages which leaves some build artifacts under
+                *    the `abuild` folder which isn't a user on target.
+                *  - at first boot, the last subsession file won't exist. */
+               return;
        }
 
        if (!subsession_exists(uid, last_subsession)) {
index 614c3c04f9164e729da843d99a6dcd5ce7421571..625648985fcecfb3e6849141d489cc752a02c43c 100644 (file)
@@ -47,10 +47,6 @@ extern "C"
         *
         *  - the plugin receives OnSubsessionX from its own events.
         *
-        *  - if you call sessiond_internal_x_subsession from within
-        *    OnSubsessionX, there will be an inversion in how D-Bus
-        *    notifications to other processes are ordered
-        *
         *  - sessiond assumes single-threading and doing anything in
         *    a separate thread is a race condition. */