Date: Mon, 30 Dec 2002 12:13:14 +0000 From: "Richard Dawe" Sender: rich AT phekda DOT freeserve DOT co DOT uk To: djgpp-workers AT delorie DOT com X-Mailer: Emacs 21.3.50 (via feedmail 8.3.emacs20_6 I) and Blat ver 1.8.6 Subject: fileutils 4.1: ls and symlinks [PATCH] Message-Id: Reply-To: djgpp-workers AT delorie DOT com Hello. Below is a patch for 'ls' from fileutils 4.1. It's another case where the path handling needs to be updated to cope with DOS-style absolute paths. This patch is important, because the test suite uses symlinks extensively and uses 'ls' to check that 'cp', 'mv', etc. handle symlinks correctly. You can also get the patch here: http://www.phekda.freeserve.co.uk/richdawe/djgpp/fileutils/4.1/djgpp/fil41-cvs-ls-symlink-20021230.diff I'm not planning on doing another fileutils 4.1 release for a while. Andrew, please apply this patch, when building fileutils against CVS. You may also want to include this patch in the source distributions in gnu/filutil4.1/djgpp. I also ran the test suite with Charles's patches (basically after a cvs update) for: * handling a real /dev directory; * using _read instead of read in __internal_readlink. I didn't see any regressions in the test suite. Bye, Rich =] --- gnu.dev/filutil4.1-rel/src/ls.c 2002-10-06 10:33:32.000000000 +0000 +++ gnu.dev/filutil4.1-rel.work/src/ls.c 2002-12-18 16:54:04.000000000 +0000 @@ -2155,6 +2155,13 @@ make_link_path (const char *path, const if (linkname == 0) return 0; +#ifdef MSDOS + /* Any filename with a drive specification should be + * treated as an absolute pathname on MS-DOS. */ + if (linkname[0] && (linkname[1] == ':')) + return xstrdup (linkname); +#endif + if (*linkname == '/') return xstrdup (linkname);