#include <filesystem>
#include <iostream>
+#undef LOG_TAG
+#define LOG_TAG "SESSIOND_REGENERATE_SKEL"
+#include <dlog.h>
+
#include "fs_helpers.hpp"
#include "os_ops.hpp"
#include "dir_backend_fixed_size.hpp"
const auto &username = entry.path().filename();
const int username_uid = OS::get_uid_from_name(username.string());
- add_user_subsession(username_uid, ".template", DirBackendAddFixedSize {template_img_size_kb});
+ try {
+ add_user_subsession_inner(username_uid, ".template", DirBackendAddFixedSize {template_img_size_kb});
+ } catch (std::exception& ex) {
+ LOGW("Unable to generate skel template for username %s (uid %d): %s", username, username_uid, ex.what());
+ continue;
+ }
}
return r;