| Index: src/DefaultFileSystem.cpp |
| =================================================================== |
| --- a/src/DefaultFileSystem.cpp |
| +++ b/src/DefaultFileSystem.cpp |
| @@ -92,18 +92,22 @@ void DefaultFileSystem::Remove(const std |
| FileSystem::StatResult DefaultFileSystem::Stat(const std::string& path) const |
| { |
| FileSystem::StatResult result; |
| #ifdef WIN32 |
| WIN32_FILE_ATTRIBUTE_DATA data; |
| if (!GetFileAttributesExW(NormalizePath(path).c_str(), GetFileExInfoStandard, &data)) |
| { |
| DWORD err = GetLastError(); |
| - if (err == ERROR_FILE_NOT_FOUND || ERROR_PATH_NOT_FOUND || ERROR_INVALID_DRIVE) |
| + if (err == ERROR_FILE_NOT_FOUND || |
| + err == ERROR_PATH_NOT_FOUND || |
| + err == ERROR_INVALID_DRIVE) |
| + { |
| return result; |
| + } |
| throw RuntimeErrorWithErrno("Unable to stat " + path); |
| } |
| result.exists = true; |
| if (data.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) |
| { |
| result.isFile = false; |
| result.isDirectory = true; |