mirror of
https://github.com/RPCS3/rpcs3.git
synced 2024-11-22 10:42:36 +01:00
Win32 FS: Improve fs::create_dir
This commit is contained in:
parent
5ca6381624
commit
11824b3916
@ -595,7 +595,15 @@ bool fs::create_dir(const std::string& path)
|
|||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
if (!CreateDirectoryW(to_wchar(path).get(), NULL))
|
if (!CreateDirectoryW(to_wchar(path).get(), NULL))
|
||||||
{
|
{
|
||||||
g_tls_error = to_error(GetLastError());
|
int res = GetLastError();
|
||||||
|
|
||||||
|
if (res == ERROR_ACCESS_DENIED && is_dir(path))
|
||||||
|
{
|
||||||
|
// May happen on drives
|
||||||
|
res = ERROR_ALREADY_EXISTS;
|
||||||
|
}
|
||||||
|
|
||||||
|
g_tls_error = to_error(res);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user