From c78aad0474d060d44af6904df5be23d26ebf6270 Mon Sep 17 00:00:00 2001 From: Birunthan Mohanathas Date: Mon, 25 Jun 2012 10:29:50 +0300 Subject: [PATCH] Fixed that %APPDATA%\Rainmeter was not created on first launch due to 4647c44 --- Library/Rainmeter.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Library/Rainmeter.cpp b/Library/Rainmeter.cpp index 3d565381..ed8b59f1 100644 --- a/Library/Rainmeter.cpp +++ b/Library/Rainmeter.cpp @@ -799,12 +799,6 @@ int CRainmeter::Initialize(LPCWSTR iniPath) const WCHAR* iniFile = m_IniFile.c_str(); - // Create a default Rainmeter.ini file if needed - if (_waccess(iniFile, 0) == -1) - { - CreateOptionsFile(); - } - // Set file locations { m_SettingsPath = ExtractPath(m_IniFile); @@ -822,6 +816,12 @@ int CRainmeter::Initialize(LPCWSTR iniPath) m_DataFile += L".data"; } + // Create a default Rainmeter.ini file if needed + if (_waccess(iniFile, 0) == -1) + { + CreateOptionsFile(); + } + bool dataFileCreated = false; if (_waccess(m_DataFile.c_str(), 0) == -1) {