From 5e264bf248128735aaba4e368f3875680d2ca438 Mon Sep 17 00:00:00 2001 From: Eric Blake Date: Sat, 4 Feb 2012 11:50:53 -0700 Subject: realpath: fix problems with root handling When --relative-base is /, all other paths should be treated as relative (except for // where it matters). Also, on platforms like Cygwin where / and // are distinct, realpath was incorrectly collapsing // into /. http://debbugs.gnu.org/10472. * src/realpath.c (path_prefix, path_common_prefix): Treat / and // as having no common match. (relpath): Allow for no match even without --relative-base. * NEWS: Document this. --- NEWS | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'NEWS') diff --git a/NEWS b/NEWS index f783afb15..e9b3d2056 100644 --- a/NEWS +++ b/NEWS @@ -57,6 +57,11 @@ GNU coreutils NEWS -*- outline -*- surprising rename no-op behavior). Now, mv handles this case by skipping the usually-useless rename and simply unlinking A. + realpath no longer mishandles a root directory. This was most + noticeable on platforms where // is a different directory than /, + but could also be observed with --relative-base=/ or + --relative-to=/. [bug since the beginning, in 8.15] + ** Improvements ls can be much more efficient, especially with large directories on file -- cgit v1.2.3-70-g09d2