Project64: In FixDir check if directory exists before trying to create it

This commit is contained in:
zilmar 2013-04-15 13:52:34 +10:00
parent d6a148696c
commit 727f730f79
1 changed files with 4 additions and 5 deletions

View File

@ -227,22 +227,21 @@ void InitializeLog ( void)
void FixDirectories ( void ) void FixDirectories ( void )
{ {
CPath Directory(CPath::MODULE_DIRECTORY); CPath Directory(CPath::MODULE_DIRECTORY);
Directory.AppendDirectory(_T("Config")); Directory.AppendDirectory(_T("Config"));
Directory.CreateDirectory(); if (!Directory.DirectoryExists()) Directory.CreateDirectory();
Directory.UpDirectory(); Directory.UpDirectory();
Directory.AppendDirectory("Logs"); Directory.AppendDirectory("Logs");
Directory.CreateDirectory(); if (!Directory.DirectoryExists()) Directory.CreateDirectory();
Directory.UpDirectory(); Directory.UpDirectory();
Directory.AppendDirectory("Save"); Directory.AppendDirectory("Save");
Directory.CreateDirectory(); if (!Directory.DirectoryExists()) Directory.CreateDirectory();
Directory.UpDirectory(); Directory.UpDirectory();
Directory.AppendDirectory("Screenshots"); Directory.AppendDirectory("Screenshots");
Directory.CreateDirectory(); if (!Directory.DirectoryExists()) Directory.CreateDirectory();
} }
bool TerminatedExistingEmu() bool TerminatedExistingEmu()