[jamming] a problem with MkDir
cjamallsop at gmail.com
Tue Feb 5 22:23:38 PST 2008
The following does not work on windows... but should it? I see no
reason why it shouldn't.
MkDir \\a\\b\\c ;
'Jam dirs' will create the directories fine the first time but the
next time it will not notice the \a directory is already made. At
closer inspection it fails to scan the root directory which, by
reading the comments, I understand it should if the path is just \.
There is no problem if there is a drive letter and colon. The problem
is at the line:
sprintf( filespec, "%s/*", dir);
Which ends up making \/* and windows finds this an invalid path. To
fix it I added this line before the one above.
if ((dir == '\\' || dir == '/') && !dir) dir++;
Which simply make it scan using a /* and thus correctly finding the root files.
More information about the jamming