From 80d524f78e1110aaec16721a1117999ac0247d1d Mon Sep 17 00:00:00 2001 From: "Miso Zmiric (Mike Squinter)" Date: Wed, 24 Jun 2015 21:30:40 +0100 Subject: [PATCH] platform_file_exists now also checks for path not found errors use GetLastError after the GetFileAttributes --- src/platform/windows.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/platform/windows.c b/src/platform/windows.c index df02a1fb3c..e478b0ea34 100644 --- a/src/platform/windows.c +++ b/src/platform/windows.c @@ -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)