mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2025-01-18 15:15:37 +00:00
The screensavers and screensavers/custom_slideshow directories are now created on application startup
This commit is contained in:
parent
88754a86ed
commit
0b20fedaf2
|
@ -806,6 +806,31 @@ int main(int argc, char* argv[])
|
|||
}
|
||||
}
|
||||
|
||||
{
|
||||
// Create the screensavers and screensavers/custom_slideshow directories.
|
||||
const std::filesystem::path screensaversDir {
|
||||
Utils::FileSystem::getAppDataDirectory().append("screensavers")};
|
||||
const std::filesystem::path slideshowDir {Utils::FileSystem::getAppDataDirectory()
|
||||
.append("screensavers")
|
||||
.append("custom_slideshow")};
|
||||
if (!Utils::FileSystem::existsSTD(screensaversDir)) {
|
||||
LOG(LogInfo) << "Creating screensavers directory \"" << screensaversDir.string()
|
||||
<< "\"...";
|
||||
Utils::FileSystem::createDirectory(screensaversDir.string());
|
||||
if (!Utils::FileSystem::existsSTD(screensaversDir)) {
|
||||
LOG(LogWarning) << "Couldn't create directory, permission problems?";
|
||||
}
|
||||
}
|
||||
if (!Utils::FileSystem::existsSTD(slideshowDir)) {
|
||||
LOG(LogInfo) << "Creating custom_slideshow directory \"" << slideshowDir.string()
|
||||
<< "\"...";
|
||||
Utils::FileSystem::createDirectory(slideshowDir.string());
|
||||
if (!Utils::FileSystem::existsSTD(slideshowDir)) {
|
||||
LOG(LogWarning) << "Couldn't create directory, permission problems?";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
{
|
||||
if (!Settings::getInstance()->getBool("LegacyAppDataDirectory")) {
|
||||
// Create the controllers folder in the application data directory.
|
||||
|
|
Loading…
Reference in a new issue