The game media directory is now created on application startup instead of when first starting the scraper

This commit is contained in:
Leon Styhre 2024-04-10 22:03:50 +02:00
parent 9cf9b942ee
commit 177b5befef

View file

@ -871,6 +871,18 @@ int main(int argc, char* argv[])
#endif #endif
} }
{
// Create the game media folder.
const std::string mediaDirectory {FileData::getMediaDirectory()};
if (!Utils::FileSystem::exists(mediaDirectory)) {
LOG(LogInfo) << "Creating game media directory \"" << mediaDirectory << "\"...";
Utils::FileSystem::createDirectory(mediaDirectory);
if (!Utils::FileSystem::exists(mediaDirectory)) {
LOG(LogWarning) << "Couldn't create directory, permission problems?";
}
}
}
{ {
#if defined(__ANDROID__) #if defined(__ANDROID__)
const std::string mediaDirectory {FileData::getMediaDirectory()}; const std::string mediaDirectory {FileData::getMediaDirectory()};