Don't create gamelist folders even if their parent directory is valid.

This commit is contained in:
Aloshi 2013-12-12 16:08:52 -06:00
parent 0423dc03dd
commit 67818d5727

View file

@ -84,6 +84,12 @@ FileData* findOrCreateFile(SystemData* system, const boost::filesystem::path& pa
if(found) if(found)
return treeNode; return treeNode;
if(type == FOLDER)
{
LOG(LogWarning) << "gameList: folder doesn't already exist, won't create";
return NULL;
}
FileData* file = new FileData(type, path, system); FileData* file = new FileData(type, path, system);
treeNode->addChild(file); treeNode->addChild(file);
return file; return file;
@ -95,7 +101,7 @@ FileData* findOrCreateFile(SystemData* system, const boost::filesystem::path& pa
// if type is a folder it's gonna be empty, so don't bother // if type is a folder it's gonna be empty, so don't bother
if(type == FOLDER) if(type == FOLDER)
{ {
LOG(LogWarning) << "folder doesn't already exist, won't create metadata for folder"; LOG(LogWarning) << "gameList: folder doesn't already exist, won't create";
return NULL; return NULL;
} }