Removed duplicated code.

This commit is contained in:
Kimmo Pekkola 2009-08-12 18:02:24 +00:00
parent 122fb8f90f
commit 29e1dfba5b
2 changed files with 2 additions and 23 deletions

View File

@ -963,28 +963,7 @@ void CRainmeter::CreateDefaultConfigFile(std::wstring strFile)
}
else
{
// The folder was created successfully which means that it wasn't available yet.
// Copy the default skin to the Skins folder
std::wstring strFrom(defaultIni);
std::wstring strTo(GetIniFile());
// The strings must end with double nul
strFrom.append(L"0");
strFrom[strFrom.size() - 1] = L'\0';
strTo.append(L"0");
strTo[strTo.size() - 1] = L'\0';
SHFILEOPSTRUCT fo = {0};
fo.wFunc = FO_COPY;
fo.pFrom = strFrom.c_str();
fo.pTo = strTo.c_str();
fo.fFlags = FOF_NO_UI;
int result = SHFileOperation(&fo);
if (result != 0)
{
DebugLog(L"Unable to copy the default settings file %i", result);
}
CopyFiles(defaultIni, GetIniFile());
}
}

View File

@ -1,2 +1,2 @@
#pragma once
const int revision_number = 163;
const int revision_number = 178;