I seem to have come across a wierd behaviour of GnuWin32's mkdir (from here):
C:\sandbox>"C:\Program Files (x86)\GnuWin32\bin\mkdir.EXE" --verbose -p Q:/scratch/foo/bar
C:\Program Files (x86)\GnuWin32\bin\mkdir.EXE: created directory `Q:/scratch'
C:\Program Files (x86)\GnuWin32\bin\mkdir.EXE: created directory `Q:/scratch/foo'
C:\Program Files (x86)\GnuWin32\bin\mkdir.EXE: created directory `Q:/scratch/foo/bar'
In the above, the current drive is C and the target drive is Q.
As expected, the hierarchy gets created in Q:/scratch/foo/bar
Now, almost the same example but the current and the target drives are both C.
C:\sandbox>"C:\Program Files (x86)\GnuWin32\bin\mkdir.EXE" --verbose -p C:/scratch/foo/bar
C:\Program Files (x86)\GnuWin32\bin\mkdir.EXE: created directory `C:/scratch'
C:\Program Files (x86)\GnuWin32\bin\mkdir.EXE: created directory `C:/scratch/foo'
C:\Program Files (x86)\GnuWin32\bin\mkdir.EXE: created directory `C:/scratch/foo/bar'
mkdir's output looks right and very predictable.
However, nothing really gets created at C:/scratch/foo/bar
. Rather, the directory hierarchy gets created using the current directory as a root, i.e. what gets created is C:/sandbox/scratch/foo/bar
Can anyone confirm ? Is this a bug ? I would look at the source code if I had the time but....
Does anyone know of a more recent version of CoreUtils than 5.3.0 that's been ported to Win32 ?