projects
/
platform
/
upstream
/
coreutils.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5234813
)
(main): Remove trailing slashes from command line arguments.
author
Jim Meyering
<jim@meyering.net>
Thu, 20 Feb 1997 04:54:56 +0000
(
04:54
+0000)
committer
Jim Meyering
<jim@meyering.net>
Thu, 20 Feb 1997 04:54:56 +0000
(
04:54
+0000)
Otherwise, running `mkdir x; chmod 644 x; ls -d x/' (note the trailing
slash) makes ls fail with permission denied on at least Linux 1.2.13
and 2.0.14 systems.
src/ls.c
patch
|
blob
|
history
diff --git
a/src/ls.c
b/src/ls.c
index
6a96a5b
..
67e3723
100644
(file)
--- a/
src/ls.c
+++ b/
src/ls.c
@@
-698,7
+698,10
@@
main (int argc, char **argv)
if (i < argc)
dir_defaulted = 0;
for (; i < argc; i++)
- gobble_file (argv[i], 1, "");
+ {
+ strip_trailing_slashes (argv[i]);
+ gobble_file (argv[i], 1, "");
+ }
if (dir_defaulted)
{