summaryrefslogtreecommitdiff
path: root/src/ls.c
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>1995-05-02 04:04:32 +0000
committerJim Meyering <jim@meyering.net>1995-05-02 04:04:32 +0000
commit70b90a6f9d3325e249588b7dd61e0c763eed09f5 (patch)
tree75bfd6bea9401db8112d548ed6b4dd40517e0182 /src/ls.c
parent6d94a2954dc1e805e1bd04fb10fdf837e9c15274 (diff)
downloadcoreutils-70b90a6f9d3325e249588b7dd61e0c763eed09f5.tar.xz
(quote_filename): Never return NULL when quoting filenames
as C-strings. --quote-name was quoting only strings containing at least one C-quotable character. Reported by David J. MacKenzie.
Diffstat (limited to 'src/ls.c')
-rw-r--r--src/ls.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/ls.c b/src/ls.c
index 4aeeb08f6..4dd6e6438 100644
--- a/src/ls.c
+++ b/src/ls.c
@@ -2075,7 +2075,7 @@ quote_filename (p, quoted_length)
break;
}
- if (!found_quotable)
+ if (!found_quotable && !quote_as_string)
{
*quoted_length = p - p0;
return NULL;