From cb3c6874bc250d6749dd0d75bc1e464b19cc84d0 Mon Sep 17 00:00:00 2001 From: mjk Date: Sat, 6 Mar 2021 13:36:47 +0000 Subject: [PATCH] add restoration of shortcut's target path --- plugins/windows-notification/api/src/shortcutcreator.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/plugins/windows-notification/api/src/shortcutcreator.cpp b/plugins/windows-notification/api/src/shortcutcreator.cpp index e8c202a3..c7277f46 100644 --- a/plugins/windows-notification/api/src/shortcutcreator.cpp +++ b/plugins/windows-notification/api/src/shortcutcreator.cpp @@ -79,6 +79,11 @@ bool ImplEnsureAumiddedShortcutExists( checked(store->GetValue,(PKEY_AppUserModel_ID, aumid_prop)); if (aumid_prop.str().get() != aumid) checked(store->SetValue,(PKEY_AppUserModel_ID, property{aumid})); + + std::array targ_path; + checked(lnk->GetPath,(targ_path.data(), targ_path.size(), nullptr, 0)); + if (targ_path.data() != exe_path) + checked(lnk->SetPath,(exe_path.c_str())); } else {