* src/ls.c (gobble_file): When handling a stat-failed entry,
authorJim Meyering <jim@meyering.net>
Tue, 25 Jul 2006 16:35:59 +0000 (16:35 +0000)
committerJim Meyering <jim@meyering.net>
Tue, 25 Jul 2006 16:35:59 +0000 (16:35 +0000)
print the entry name not the absolute_name -- to be consistent
with the usual case.
* tests/ls/stat-failed: Update accordingly.

ChangeLog
src/ls.c
tests/ls/stat-failed

index b6d26750013fb9236ea36aae13e3d60749f1a2f6..e69b91b5726df1e8f9d97aa808995a68404995b0 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
 2006-07-25  Jim Meyering  <jim@meyering.net>
 
+       * src/ls.c (gobble_file): When handling a stat-failed entry,
+       print the entry name not the absolute_name -- to be consistent
+       with the usual case.
+       * tests/ls/stat-failed: Update accordingly.
+
        * src/ls.c: Add parens around the new uses of ?: ternary operator.
 
        * src/dircolors.hin: Mention that ORPHAN refers not just to dangling
index b3efe53f31dfd40b97e56d74ffa1e4781cc2ec85..ab544d14dfe1fd97ddc33a1a9f8c2dac580741fc 100644 (file)
--- a/src/ls.c
+++ b/src/ls.c
@@ -2625,7 +2625,7 @@ gobble_file (char const *name, enum filetype type, ino_t inode,
 #if USE_ACL
          f->have_acl = false;
 #endif
-         f->name = xstrdup (absolute_name);
+         f->name = xstrdup (name);
          files_index++;
 
          return 0;
index bf86681bac87d8e67567cfb0b89ed5256fc699b0..c038c3757041dbd53e445245872f82af7b87ce6e 100755 (executable)
@@ -35,7 +35,7 @@ test $? = 1 || fail=1
 
 cat <<\EOF > exp || fail=1
 total 0
-?--------- ? ?            ? d/s
+?--------- ? ?            ? s
 EOF
 
 cmp out exp || fail=1
@@ -47,8 +47,8 @@ ls --dired -il d > out 2> /dev/null && fail=1
 
 cat <<\EOF > exp || fail=1
   total 0
-  ? ?--------- ? ? ? ?            ? d/s
-//DIRED// 46 49
+  ? ?--------- ? ? ? ?            ? s
+//DIRED// 46 47
 //DIRED-OPTIONS// --quoting-style=literal
 EOF