]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
(quote_filename): Never return NULL when quoting filenames
authorJim Meyering <jim@meyering.net>
Tue, 2 May 1995 04:04:32 +0000 (04:04 +0000)
committerJim Meyering <jim@meyering.net>
Tue, 2 May 1995 04:04:32 +0000 (04:04 +0000)
as C-strings.  --quote-name was quoting only strings containing
at least one C-quotable character.  Reported by David J. MacKenzie.

src/ls.c

index 4aeeb08f6c0d767cdcb1adc8f4f43d456eb943f2..4dd6e64382fa65bf3fe7ed137f141b2ffa4fd73a 100644 (file)
--- 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;