diff --git a/repertory/repertory/src/ui/mgmt_app_config.cpp b/repertory/repertory/src/ui/mgmt_app_config.cpp index f823ac5a..f45636d2 100644 --- a/repertory/repertory/src/ui/mgmt_app_config.cpp +++ b/repertory/repertory/src/ui/mgmt_app_config.cpp @@ -244,9 +244,12 @@ void mgmt_app_config::set_auto_start(bool auto_start) { #if defined(_WIN32) if (auto_start) { - if (utils::create_shortcut(utils::path::combine(L".", {L"repertory"}), - {L"-ui", L"-lo"}, utils::path::absolute(L"."), - L"repertory", false)) { + shortcut_cfg cfg{}; + cfg.arguments = {L"-ui", L"-lo"}; + cfg.exe_path = utils::path::combine(L".", {L"repertory"}); + cfg.location = utils::path::absolute(L"."); + cfg.shortcut_name = L"repertory"; + if (utils::create_shortcut(cfg, false)) { utils::error::handle_info(function_name, "created auto-start entry|name|repertory"); } else { diff --git a/support/src/utils/windows.cpp b/support/src/utils/windows.cpp index d3c7f73a..5cd2747e 100644 --- a/support/src/utils/windows.cpp +++ b/support/src/utils/windows.cpp @@ -243,8 +243,9 @@ auto create_shortcut(const shortcut_cfg &cfg, bool overwrite_existing) -> bool { } if (not utils::file::file{lnk_path}.remove()) { - utils::error::handle_error( - function_name, "failed to remove existing shortcut|path|" + lnk_path); + utils::error::handle_error(function_name, + "failed to remove existing shortcut|path|" + + utils::string::to_utf8(lnk_path)); return false; }