[ui] Add auto-mount on first launch functionality #52
This commit is contained in:
@@ -268,7 +268,7 @@ void mgmt_app_config::set_auto_start(bool auto_start) {
|
||||
#endif // defined(_WIN32)
|
||||
|
||||
#if defined(__APPLE__)
|
||||
auto plist_path = utils::file::file{
|
||||
auto file = utils::file::file{
|
||||
utils::path::combine("~", {"/Library/LaunchAgents", label}),
|
||||
};
|
||||
if (auto_start) {
|
||||
@@ -280,7 +280,7 @@ void mgmt_app_config::set_auto_start(bool auto_start) {
|
||||
};
|
||||
cfg.keep_alive = false;
|
||||
cfg.label = "com.fifthgrid.blockstorage.repertory.ui";
|
||||
cfg.plist_path = plist_path;
|
||||
cfg.plist_path = file.get_path();
|
||||
cfg.run_at_load = true;
|
||||
cfg.stderr_log = "/tmp/repertory_ui.err";
|
||||
cfg.stdout_log = "/tmp/repertory_ui.out";
|
||||
@@ -293,7 +293,7 @@ void mgmt_app_config::set_auto_start(bool auto_start) {
|
||||
function_name, utils::get_last_error_code(),
|
||||
"failed to create auto-start entry|name|repertory");
|
||||
}
|
||||
} else if (plist_path.remove()) {
|
||||
} else if (file.remove()) {
|
||||
utils::error::handle_info(function_name,
|
||||
"removed auto-start entry|name|repertory");
|
||||
} else {
|
||||
|
Reference in New Issue
Block a user