From bcad447ce2df0af66910a51bc994fc11ff7d46a9 Mon Sep 17 00:00:00 2001 From: Sebastien Barre Date: Tue, 16 Sep 2008 17:40:47 -0400 Subject: [PATCH] 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. --- Utilities/cmtar/util.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Utilities/cmtar/util.c b/Utilities/cmtar/util.c index 550fb93df..31f7fc878 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