From 53c12d819ac27b540361f078e6435fa1141fe017 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Mon, 5 Feb 2024 19:06:44 +0300 Subject: =?UTF-8?q?fixes=20#4171=20(Avatar=20History:=20=D1=82=D0=B5=D0=BA?= =?UTF-8?q?=D1=81=D1=82=20=D0=B2=20=D0=BD=D0=B0=D1=81=D1=82=D1=80=D0=BE?= =?UTF-8?q?=D0=B9=D0=BA=D0=B0=D1=85=20=D0=B2=D1=8B=D0=B1=D0=BE=D1=80=D0=B0?= =?UTF-8?q?=20=D0=BF=D1=83=D1=82=D0=B8=20=D0=BD=D0=B5=20=D1=81=D0=BE=D0=BE?= =?UTF-8?q?=D1=82=D0=B2=D0=B5=D1=82=D1=81=D1=82=D0=B2=D1=83=D0=B5=D1=82=20?= =?UTF-8?q?=D0=B4=D0=B5=D0=B9=D1=81=D1=82=D0=B2=D0=B8=D1=82=D0=B5=D0=BB?= =?UTF-8?q?=D1=8C=D0=BD=D0=BE=D1=81=D1=82=D0=B8)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- plugins/AvatarHistory/src/AvatarHistory.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'plugins') diff --git a/plugins/AvatarHistory/src/AvatarHistory.cpp b/plugins/AvatarHistory/src/AvatarHistory.cpp index ecedb62cc0..ce2257fa7d 100644 --- a/plugins/AvatarHistory/src/AvatarHistory.cpp +++ b/plugins/AvatarHistory/src/AvatarHistory.cpp @@ -27,7 +27,6 @@ uint32_t mirVer; HANDLE hFolder = nullptr; -wchar_t profilePath[MAX_PATH]; // database profile path (read at startup only) wchar_t basedir[MAX_PATH]; CMPlugin g_plugin; MWindowList hAvatarWindowsList = nullptr; @@ -225,7 +224,7 @@ static int PreShutdown(WPARAM, LPARAM) static int ModulesLoaded(WPARAM, LPARAM) { - mir_snwprintf(basedir, L"%s\\Avatars History", profilePath); + wcsncpy_s(basedir, VARSW(MIRANDA_USERDATAW L"\\Avatars History"), _TRUNCATE); hFolder = FoldersRegisterCustomPathW(LPGEN("Avatars"), LPGEN("Avatar History"), PROFILE_PATHW L"\\" CURRENT_PROFILEW L"\\Avatars History"); @@ -325,8 +324,6 @@ int CMPlugin::Load() CreateServiceFunction(MS_AVATARHISTORY_ENABLED, IsEnabled); CreateServiceFunction(MS_AVATARHISTORY_GET_CACHED_AVATAR, GetCachedAvatar); - Profile_GetPathW(MAX_PATH, profilePath); - g_plugin.addSound("avatar_changed", LPGENW("Avatar history"), LPGENW("Contact changed avatar")); g_plugin.addSound("avatar_removed", LPGENW("Avatar history"), LPGENW("Contact removed avatar")); -- cgit v1.2.3