diff options
author | Sebastien Barre <sebastien.barre@kitware.com> | 2008-09-16 21:40:47 (GMT) |
---|---|---|
committer | Sebastien Barre <sebastien.barre@kitware.com> | 2008-09-16 21:40:47 (GMT) |
commit | bcad447ce2df0af66910a51bc994fc11ff7d46a9 (patch) | |
tree | c1587c89fc2b1ebfd37b9b6bf28f0b6420903dca /Utilities/cmtar | |
parent | 79a38073400e7e47696064af240de40e24257cf0 (diff) | |
download | CMake-bcad447ce2df0af66910a51bc994fc11ff7d46a9.zip CMake-bcad447ce2df0af66910a51bc994fc11ff7d46a9.tar.gz CMake-bcad447ce2df0af66910a51bc994fc11ff7d46a9.tar.bz2 |
ENH: wow. On some Windows machine, trying to mkdir("C:") would fail miserably. WHy not in debug mode? Why not on other win32 machines. Who knows.
Diffstat (limited to 'Utilities/cmtar')
-rw-r--r-- | Utilities/cmtar/util.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Utilities/cmtar/util.c b/Utilities/cmtar/util.c index 550fb93..31f7fc8 100644 --- a/Utilities/cmtar/util.c +++ b/Utilities/cmtar/util.c @@ -110,6 +110,13 @@ mkdirhier(char *path) if (dst[0] != '\0') strcat(dst, "/"); strcat(dst, dirp); + +#if defined(_WIN32) + /* On some Windows machine, trying to mkdir("C:") would fail miserably */ + if (dst[strlen(dst) - 1] == ':') + continue; +#endif + if ( #if defined(_WIN32) && !defined(__CYGWIN__) mkdir(dst) == -1 |