mirror of https://github.com/OpenRCT2/OpenRCT2.git
Fix #8219: Faulty folder recreation in "save" folder
This commit is contained in:
parent
c01cfbdc26
commit
70ae847a72
|
@ -240,17 +240,10 @@ static const char* getFilterPatternByType(const int32_t type, const bool isSave)
|
|||
static int32_t window_loadsave_get_dir(const int32_t type, char* path, size_t pathSize)
|
||||
{
|
||||
const char* last_save = getLastDirectoryByType(type);
|
||||
if (last_save && platform_ensure_directory_exists(last_save))
|
||||
if (last_save != nullptr && platform_directory_exists(last_save))
|
||||
safe_strcpy(path, last_save, pathSize);
|
||||
else
|
||||
getInitialDirectoryByType(type, path, pathSize);
|
||||
|
||||
if (!platform_ensure_directory_exists(path))
|
||||
{
|
||||
log_error("Unable to create save directory.");
|
||||
return 0;
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue