From 2eb1eea06e27c86b0388fbf8898f962208771e2f Mon Sep 17 00:00:00 2001 From: mjk Date: Fri, 5 Mar 2021 22:44:05 +0000 Subject: [PATCH] clarify GetCurrentModulePath's name --- plugins/windows-notification/api/include/win32.hpp | 2 +- plugins/windows-notification/api/src/shortcutcreator.cpp | 2 +- plugins/windows-notification/api/src/win32.cpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/windows-notification/api/include/win32.hpp b/plugins/windows-notification/api/include/win32.hpp index 48987791..eba2e0e7 100644 --- a/plugins/windows-notification/api/include/win32.hpp +++ b/plugins/windows-notification/api/include/win32.hpp @@ -30,7 +30,7 @@ private: mutable std::array msg; }; -std::wstring GetCurrentModulePath(); +std::wstring GetExePath(); std::wstring GetShortcutPath(); #define EXTERN extern "C" diff --git a/plugins/windows-notification/api/src/shortcutcreator.cpp b/plugins/windows-notification/api/src/shortcutcreator.cpp index 8814bacc..f62c8267 100644 --- a/plugins/windows-notification/api/src/shortcutcreator.cpp +++ b/plugins/windows-notification/api/src/shortcutcreator.cpp @@ -133,7 +133,7 @@ bool ImplEnsureAumiddedShortcutExists(const char *const aumid) return false; } - auto exePath = GetCurrentModulePath(); + auto exePath = GetExePath(); auto shortcutPath = GetShortcutPath(); auto path = shortcutPath + LR"(\Microsoft\Windows\Start Menu\Programs\Dino.lnk)"; diff --git a/plugins/windows-notification/api/src/win32.cpp b/plugins/windows-notification/api/src/win32.cpp index 88f8eb0b..02285fe1 100644 --- a/plugins/windows-notification/api/src/win32.cpp +++ b/plugins/windows-notification/api/src/win32.cpp @@ -9,7 +9,7 @@ win32_error::win32_error() noexcept : win32_error{::GetLastError()} {} -std::wstring GetCurrentModulePath() +std::wstring GetExePath() { std::wstring exePath(MAX_PATH, 0); auto charWritten = GetModuleFileName(nullptr, exePath.data(), exePath.size());