diff --git a/src/desktop/paths.cpp b/src/desktop/paths.cpp index 5a637b2fdc8..13adfffd3cc 100644 --- a/src/desktop/paths.cpp +++ b/src/desktop/paths.cpp @@ -150,8 +150,10 @@ inline std::string pretty_path(const std::string& path) inline config get_bookmarks_config() { - auto cfg = prefs::get().dir_bookmarks(); - return cfg ? *cfg : config{}; + const auto& cfg = prefs::get().dir_bookmarks(); + return cfg.has_value() ? cfg.value() : config(); + +// return cfg ? *cfg : config{}; } inline void commit_bookmarks_config(config& cfg) diff --git a/src/preferences/preferences.hpp b/src/preferences/preferences.hpp index 6e548ad1f06..7804f7f11c5 100644 --- a/src/preferences/preferences.hpp +++ b/src/preferences/preferences.hpp @@ -819,7 +819,6 @@ class prefs static constexpr std::array unsynced_attributes_{ prefs_list::auto_pixel_scale, prefs_list::core, - prefs_list::dir_bookmarks, prefs_list::draw_delay, prefs_list::editor_chosen_addon, prefs_list::gui2_theme, @@ -841,6 +840,7 @@ class prefs }; static constexpr std::array unsynced_children_{ prefs_list::editor_recent_files, + prefs_list::dir_bookmarks, }; static_assert(synced_attributes_.size() + synced_children_.size() + unsynced_attributes_.size() + unsynced_children_.size() == prefs_list::values.size(), "attribute missing from lists of synced or unsynced preferences!"); };