mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-04-20 03:25:16 +00:00
Win32 FS: Improve fs::create_dir
This commit is contained in:
parent
5ca6381624
commit
11824b3916
1 changed files with 9 additions and 1 deletions
|
@ -595,7 +595,15 @@ bool fs::create_dir(const std::string& path)
|
|||
#ifdef _WIN32
|
||||
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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue