This is the mail archive of the
cygwin-xfree@cygwin.com
mailing list for the Cygwin XFree86 project.
Potential patch for mkdirhier
- From: "Y.W. Law" <ywlaw at cs dot utwente dot nl>
- To: cygwin-xfree at cygwin dot com
- Date: Sun, 22 Jun 2003 16:14:33 +0200
- Subject: Potential patch for mkdirhier
- Reply-to: cygwin-xfree at cygwin dot com
hi all,
i have recently discoverd that the script "mkdirhier" does not work
properly on Cygwin (i doubt that i'm the first one who discovered this,
but i can't find any patch on the web). the cause is that in the script,
it is possible for /bin/sh to shift $@ such that you will get empty
string for $filename. when that happens, mkdirhier will possibly try to
mkdir such path "//some/path" --> this doesn't present any problem for
Linux, but it is an error on Cygwin. Therefore, i propose the following
patch to look out for empty string when parsing the path:
--- mkdirhier.bak 2002-01-21 14:41:32.000000000 +0100
+++ mkdirhier 2003-06-22 15:51:23.000000000 +0200
@@ -43,6 +43,11 @@
for filename
do
+ #[ywlaw]
+ if [ "$filename" = '' ]; then
+ continue
+ fi
+
path=$prefix$filename
prefix=$path/
shift
i hope this is a useful observation.
Best regards,
yw