mirror of
https://github.com/chibicitiberiu/rainmeter-studio.git
synced 2024-02-24 04:33:31 +00:00
Fixed that Themes folder is not created on first launch if Skins exists
This commit is contained in:
parent
74c3c2cf5c
commit
3dce61b3e1
@ -949,21 +949,22 @@ int CRainmeter::Initialize(LPCWSTR szPath)
|
|||||||
CreateDirectory(m_SkinPath.c_str(), NULL);
|
CreateDirectory(m_SkinPath.c_str(), NULL);
|
||||||
m_SkinPath += L"\\Skins\\";
|
m_SkinPath += L"\\Skins\\";
|
||||||
DWORD result = CreateDirectory(m_SkinPath.c_str(), NULL);
|
DWORD result = CreateDirectory(m_SkinPath.c_str(), NULL);
|
||||||
if (result != 0)
|
if (result)
|
||||||
{
|
{
|
||||||
// The folder was created successfully which means that it wasn't available yet.
|
// The folder was created successfully which means that it wasn't available yet.
|
||||||
// Copy the default skin to the Skins folder
|
// Copy the default skin to the Skins folder
|
||||||
std::wstring strFrom(m_Path + L"Skins\\*.*");
|
std::wstring from = m_Path + L"Skins\\*.*";
|
||||||
std::wstring strTo(m_SkinPath);
|
CSystem::CopyFiles(from, m_SkinPath);
|
||||||
CSystem::CopyFiles(strFrom, strTo);
|
}
|
||||||
|
|
||||||
// Copy also the themes to the %APPDATA%
|
std::wstring themesPath = GetSettingsPath();
|
||||||
strFrom = m_Path;
|
themesPath += L"Themes\\";
|
||||||
strFrom += L"Themes\\*.*";
|
result = CreateDirectory(themesPath.c_str(), NULL);
|
||||||
strTo = GetSettingsPath();
|
if (result)
|
||||||
strTo += L"Themes\\";
|
{
|
||||||
CreateDirectory(strTo.c_str(), NULL);
|
// Copy themes to %APPDATA%
|
||||||
CSystem::CopyFiles(strFrom, strTo);
|
std::wstring from = m_Path + L"Themes\\*.*";
|
||||||
|
CSystem::CopyFiles(from, themesPath);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
Loading…
x
Reference in New Issue
Block a user