diff options
| author | Roman Divacky <rdivacky@FreeBSD.org> | 2009-11-05 17:17:44 +0000 |
|---|---|---|
| committer | Roman Divacky <rdivacky@FreeBSD.org> | 2009-11-05 17:17:44 +0000 |
| commit | 72cc50852bec44580ee7efe1aa2076273008a6ae (patch) | |
| tree | adc0bc5dc9cb37579ee90d3c0f08c98c0711bebe /lib/System/Win32/Path.inc | |
| parent | fc25e9aa52455d7aa75f3237afd79b8d89548bb5 (diff) | |
Notes
Diffstat (limited to 'lib/System/Win32/Path.inc')
| -rw-r--r-- | lib/System/Win32/Path.inc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/System/Win32/Path.inc b/lib/System/Win32/Path.inc index 46b965f4b052..573369e97d49 100644 --- a/lib/System/Win32/Path.inc +++ b/lib/System/Win32/Path.inc @@ -608,7 +608,8 @@ Path::createDirectoryOnDisk(bool create_parents, std::string* ErrMsg) { while (*next) { next = strchr(next, '/'); *next = 0; - if (!CreateDirectory(pathname, NULL)) + if (!CreateDirectory(pathname, NULL) && + GetLastError() != ERROR_ALREADY_EXISTS) return MakeErrMsg(ErrMsg, std::string(pathname) + ": Can't create directory: "); *next++ = '/'; @@ -616,7 +617,8 @@ Path::createDirectoryOnDisk(bool create_parents, std::string* ErrMsg) { } else { // Drop trailing slash. pathname[len-1] = 0; - if (!CreateDirectory(pathname, NULL)) { + if (!CreateDirectory(pathname, NULL) && + GetLastError() != ERROR_ALREADY_EXISTS) { return MakeErrMsg(ErrMsg, std::string(pathname) + ": Can't create directory: "); } } |
