summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2006-07-25 16:35:59 +0000
committerJim Meyering <jim@meyering.net>2006-07-25 16:35:59 +0000
commit0b34021d6db942c7e70fbc95d2fc45ef6a7f36f6 (patch)
treeb8d6c7126663621dc7774397b66c17b106ed52a8
parent995cbf7830c7bf98b737f136c3916d1af05e6c60 (diff)
downloadcoreutils-0b34021d6db942c7e70fbc95d2fc45ef6a7f36f6.tar.xz
* 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.
-rw-r--r--ChangeLog5
-rw-r--r--src/ls.c2
-rwxr-xr-xtests/ls/stat-failed6
3 files changed, 9 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index b6d267500..e69b91b57 100644
--- 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
diff --git a/src/ls.c b/src/ls.c
index b3efe53f3..ab544d14d 100644
--- 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;
diff --git a/tests/ls/stat-failed b/tests/ls/stat-failed
index bf86681ba..c038c3757 100755
--- a/tests/ls/stat-failed
+++ b/tests/ls/stat-failed
@@ -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