mirror of
https://github.com/chibicitiberiu/rainmeter-studio.git
synced 2024-02-24 04:33:31 +00:00
Removed duplicated code.
This commit is contained in:
parent
122fb8f90f
commit
29e1dfba5b
@ -963,28 +963,7 @@ void CRainmeter::CreateDefaultConfigFile(std::wstring strFile)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// The folder was created successfully which means that it wasn't available yet.
|
CopyFiles(defaultIni, GetIniFile());
|
||||||
// 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);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,2 +1,2 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
const int revision_number = 163;
|
const int revision_number = 178;
|
Loading…
Reference in New Issue
Block a user