From 659cb563bdf1d51169926e286152cbacf2298bd0 Mon Sep 17 00:00:00 2001 From: spx Date: Tue, 29 May 2012 21:08:50 -0700 Subject: [PATCH] Tweaks --- Library/Rainmeter.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Library/Rainmeter.cpp b/Library/Rainmeter.cpp index 1dd69176..1946c757 100644 --- a/Library/Rainmeter.cpp +++ b/Library/Rainmeter.cpp @@ -3172,7 +3172,8 @@ void CRainmeter::SetDisableVersionCheck(bool check) void CRainmeter::TestSettingsFile(bool bDefaultIniLocation) { - if (!CSystem::IsFileWritable(m_IniFile.c_str())) + const WCHAR* iniFile = m_IniFile.c_str(); + if (!CSystem::IsFileWritable(iniFile)) { std::wstring error = GetString(ID_STR_SETTINGSNOTWRITABLE); @@ -3181,11 +3182,11 @@ void CRainmeter::TestSettingsFile(bool bDefaultIniLocation) std::wstring strTarget = L"%APPDATA%\\Rainmeter\\"; ExpandEnvironmentVariables(strTarget); - error += GetFormattedString(ID_STR_SETTINGSMOVEFILE, m_IniFile.c_str(), strTarget.c_str()); + error += GetFormattedString(ID_STR_SETTINGSMOVEFILE, iniFile, strTarget.c_str()); } else { - error += GetFormattedString(ID_STR_SETTINGSREADONLY, m_IniFile.c_str()); + error += GetFormattedString(ID_STR_SETTINGSREADONLY, iniFile); } MessageBox(NULL, error.c_str(), APPNAME, MB_OK | MB_ICONERROR);