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.

This commit is contained in:
Sebastien Barre 2008-09-16 17:40:47 -04:00
parent 79a3807340
commit bcad447ce2
1 changed files with 7 additions and 0 deletions

View File

@ -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