mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-28 11:49:06 +00:00
Win32/FileUtil: Fix IsDirectory() not working for certain directories
This commit is contained in:
parent
91a447394b
commit
db0e5108dc
6 changed files with 13 additions and 8 deletions
|
@ -24,6 +24,7 @@
|
|||
|
||||
#ifdef _WIN32
|
||||
#include <windows.h>
|
||||
#include <Shlwapi.h>
|
||||
#include <commdlg.h> // for GetSaveFileName
|
||||
#include <direct.h> // getcwd
|
||||
#include <io.h>
|
||||
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue