From 240b4b12c1ec026be8a62b7ecd1f4702736b0e1b Mon Sep 17 00:00:00 2001 From: George Hazan Date: Mon, 3 Jun 2019 12:28:00 +0300 Subject: fixes #1971 completely (SmileyAdd: regressions) --- plugins/SmileyAdd/src/smileys.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'plugins/SmileyAdd/src') diff --git a/plugins/SmileyAdd/src/smileys.cpp b/plugins/SmileyAdd/src/smileys.cpp index 904635102c..100d695ddb 100644 --- a/plugins/SmileyAdd/src/smileys.cpp +++ b/plugins/SmileyAdd/src/smileys.cpp @@ -350,9 +350,9 @@ bool SmileyPackType::LoadSmileyFile(const CMStringW &filename, const CMStringW & return false; } + wchar_t wszTmp[MAX_PATH]; CMStringW modpath = VARSW(filename); if (_waccess(modpath, 4) != 0) { - wchar_t wszTmp[MAX_PATH]; PathToAbsoluteW(filename, wszTmp, g_plugin.wszDefaultPath[0] ? g_plugin.wszDefaultPath : nullptr); if (_waccess(wszTmp, 4) != 0) { if (!noerr) { @@ -365,9 +365,10 @@ bool SmileyPackType::LoadSmileyFile(const CMStringW &filename, const CMStringW & m_Name = L"Nothing loaded"; return false; } - modpath = wszTmp; } + else PathToAbsoluteW(modpath, wszTmp, g_plugin.wszDefaultPath[0] ? g_plugin.wszDefaultPath : nullptr); + modpath = wszTmp; m_Filename = filename; // Load file -- cgit v1.2.3