From db0e5108dc2e79732a0ba700a48d544fbeaba99e Mon Sep 17 00:00:00 2001 From: spycrab Date: Fri, 4 May 2018 23:43:32 +0200 Subject: Win32/FileUtil: Fix IsDirectory() not working for certain directories --- Source/Core/Common/FileUtil.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'Source/Core/Common/FileUtil.cpp') diff --git a/Source/Core/Common/FileUtil.cpp b/Source/Core/Common/FileUtil.cpp index 85f252f143..88b17c99c6 100644 --- a/Source/Core/Common/FileUtil.cpp +++ b/Source/Core/Common/FileUtil.cpp @@ -24,6 +24,7 @@ #ifdef _WIN32 #include +#include #include // for GetSaveFileName #include // getcwd #include @@ -111,7 +112,11 @@ bool Exists(const std::string& path) // Returns true if the path exists and is a directory bool IsDirectory(const std::string& path) { +#ifdef _WIN32 + return PathIsDirectory(UTF8ToUTF16(path).c_str()); +#else return FileInfo(path).IsDirectory(); +#endif } // Returns true if the path exists and is a file -- cgit v1.2.3