diff options
Diffstat (limited to 'Utilities')
-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 |