summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMostyn Bramley-Moore <mostynb@opera.com>2014-01-07 09:33:09 (GMT)
committerMostyn Bramley-Moore <mostynb@opera.com>2014-01-07 10:28:15 (GMT)
commit5d03a85eaa10804243686acdd1e5fd6a71831176 (patch)
tree263946fd267db8216226be3a7ca96069f81e4215 /src
parent3e4bf25c40450393b5c5006c11d6e4236294c804 (diff)
downloadNinja-5d03a85eaa10804243686acdd1e5fd6a71831176.zip
Ninja-5d03a85eaa10804243686acdd1e5fd6a71831176.tar.gz
Ninja-5d03a85eaa10804243686acdd1e5fd6a71831176.tar.bz2
don't Fail if trying to mkdir when the dir already exists
Diffstat (limited to 'src')
-rw-r--r--src/disk_interface.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/disk_interface.cc b/src/disk_interface.cc
index 3233144..090e94e 100644
--- a/src/disk_interface.cc
+++ b/src/disk_interface.cc
@@ -146,6 +146,9 @@ bool RealDiskInterface::WriteFile(const string& path, const string& contents) {
bool RealDiskInterface::MakeDir(const string& path) {
if (::MakeDir(path) < 0) {
+ if (errno == EEXIST) {
+ return true;
+ }
Error("mkdir(%s): %s", path.c_str(), strerror(errno));
return false;
}