Skip to content

Commit

Permalink
Fix OpenRCT2#8219: Faulty folder recreation in save
Browse files Browse the repository at this point in the history
  • Loading branch information
hokasha2016 committed Mar 27, 2019
1 parent 2ca83c2 commit 06fb530
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions src/openrct2-ui/windows/LoadSave.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -240,17 +240,12 @@ 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))
// checks for path existance
if (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;
}

Expand Down

0 comments on commit 06fb530

Please sign in to comment.