Fix some posix assumptions related to running shell commands.

Differential Revision: http://reviews.llvm.org/D6553

Reviewed By: Greg Clayton

llvm-svn: 223548
This commit is contained in:
Zachary Turner
2014-12-06 00:14:24 +00:00
parent 3464e321b8
commit 00cdc98b7f
5 changed files with 50 additions and 30 deletions

View File

@@ -27,7 +27,7 @@ FileSystem::MakeDirectory(const char *path, uint32_t file_permissions)
// On Win32, the mode parameter is ignored, as Windows files and directories support a
// different permission model than POSIX.
Error error;
if (!::CreateDirectory(path, NULL))
if (!::CreateDirectory(path, NULL) && GetLastError() != ERROR_ALREADY_EXISTS)
error.SetError(::GetLastError(), lldb::eErrorTypeWin32);
return error;
}