forked from rosebudai/OpenRCT2-Web
Merge pull request #1464 from mzmiric5/fix_file-exists-path-check
platform_file_exists now also checks for path not found errors
This commit is contained in:
commit
e2d918faf3
1 file changed
+1
-1
@@ -92,7 +92,7 @@ char platform_get_path_separator()
|
||||
|
||||
int platform_file_exists(const char *path)
|
||||
{
|
||||
return !(GetFileAttributes(path) == INVALID_FILE_ATTRIBUTES && GetLastError() == ERROR_FILE_NOT_FOUND);
|
||||
return !(GetFileAttributes(path) == INVALID_FILE_ATTRIBUTES && (GetLastError() == ERROR_FILE_NOT_FOUND || GetLastError() == ERROR_PATH_NOT_FOUND));
|
||||
}
|
||||
|
||||
int platform_directory_exists(const char *path)
|
||||
|
||||
Reference in new issue
Block a user