Mail Archives: djgpp/1997/01/07/08:43:56
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] != '/')
- Raw text -