summaryrefslogtreecommitdiff
path: root/cpp/src/IcePatch2/Util.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/src/IcePatch2/Util.cpp')
-rw-r--r--cpp/src/IcePatch2/Util.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/cpp/src/IcePatch2/Util.cpp b/cpp/src/IcePatch2/Util.cpp
index 2462007df90..09e670bc6be 100644
--- a/cpp/src/IcePatch2/Util.cpp
+++ b/cpp/src/IcePatch2/Util.cpp
@@ -675,6 +675,15 @@ IcePatch2::createDirectoryRecursive(const string& pa)
if(!isRoot(path + "/"))
{
+ OS::structstat buf;
+ if(OS::osstat(path, &buf) != -1)
+ {
+ if(S_ISDIR(buf.st_mode))
+ {
+ return;
+ }
+ }
+
if(OS::mkdir(path, 0777) == -1)
{
if(errno != EEXIST)