Date: Tue, 7 Jan 1997 15:29:09 +0200 (IST) From: Eli Zaretskii To: Mark Lewis cc: djgpp AT delorie DOT com Subject: Re: BUG: Possible bug in DJGPP "ls" port In-Reply-To: <5arpl1$ju7@bambam.soi.city.ac.uk> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII On 6 Jan 1997, Mark Lewis wrote: > I have a directory 'f:\x' which contains a few files (including, for example > 'file.zip'). If I am in 'f:\' and I do `ls x` everything works fine. If I > try `ls -p`, or any of the other switches I've tried off-hand, it throws up > all sorts of errors about 'ls: xfile.zip: No such file or directory This is indeed a bug in the DJGPP port of `ls', thanks for reporting it. Patched versions of `ls.exe', `dir.exe' and `vdir.exe' are available from ftp://is.elta.co.il/pub/. A source-level patch (for those who have the Fileutils source distribution v2gnu/fil313s.zip) is below: *** src/ls.c~0 Mon Sep 30 10:36:32 1996 --- src/ls.c Tue Jan 7 09:52:10 1997 *************** attach (char *dest, const char *dirname, *** 2793,2800 **** *dest++ = *dirnamep++; #ifdef MSDOS /* "d:" does NOT mean "d:/" */ ! if (dirnamep > dirname + 1 ! && (dirname[1] != ':' || dirname[2] != '\0')) #endif /* Add '/' if `dirname' doesn't already end with it. */ if (dirnamep > dirname && dirnamep[-1] != '/') --- 2793,2800 ---- *dest++ = *dirnamep++; #ifdef MSDOS /* "d:" does NOT mean "d:/" */ ! if (dirnamep <= dirname + 1 ! || dirname[1] != ':' || dirname[2] != '\0') #endif /* Add '/' if `dirname' doesn't already end with it. */ if (dirnamep > dirname && dirnamep[-1] != '/')