From 9654dc21aefa72c8e241e273583cf95b21169a17 Mon Sep 17 00:00:00 2001 From: Kimmo Pekkola Date: Mon, 3 Aug 2009 22:21:56 +0000 Subject: [PATCH] #PROGRAMPATH# and #ADDONSPATH# returned incorrect value if the ini file was given as a command line argument. Fixed. --- Library/Rainmeter.cpp | 3 +-- revision-number.h | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/Library/Rainmeter.cpp b/Library/Rainmeter.cpp index 6ba5b4fd..dc33d6c7 100644 --- a/Library/Rainmeter.cpp +++ b/Library/Rainmeter.cpp @@ -671,9 +671,9 @@ int CRainmeter::Initialize(HWND Parent, HINSTANCE Instance, LPCSTR szPath) bool bDefaultIniLocation = false; + m_Path = tmpName; if (c_CmdLine.empty()) { - m_Path = tmpName; m_IniFile = m_Path + L"Rainmeter.ini"; // If the ini file doesn't exist in the program folder store it to the %APPDATA% instead so that things work better in Vista/Win7 @@ -709,7 +709,6 @@ int CRainmeter::Initialize(HWND Parent, HINSTANCE Instance, LPCSTR szPath) iniFile += L"\\Rainmeter.ini"; } - m_Path = ExtractPath(iniFile); m_IniFile = iniFile; // If the ini file doesn't exist in the %APPDATA% either, create a default rainmeter.ini file. diff --git a/revision-number.h b/revision-number.h index 82cb9cc6..95c45a27 100644 --- a/revision-number.h +++ b/revision-number.h @@ -1,2 +1,2 @@ #pragma once -const int revision_number = 137; \ No newline at end of file +const int revision_number = 139; \ No newline at end of file