diff options
author | Jim Meyering <jim@meyering.net> | 2005-10-19 07:32:14 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 2005-10-19 07:32:14 +0000 |
commit | dee664c8bb921d0cab8f743a46cfced759fade3b (patch) | |
tree | c084a7f9a2cb6ce71db129c6aaa9caca0b28bec6 /src | |
parent | 21735a53583545c95107c9029b987d03d8244752 (diff) | |
download | coreutils-dee664c8bb921d0cab8f743a46cfced759fade3b.tar.xz |
(append_quoted): Quote ' correctly.
Problem reported by Eric Blake.
Diffstat (limited to 'src')
-rw-r--r-- | src/dircolors.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/dircolors.c b/src/dircolors.c index 19bdd3335..ace0d78a5 100644 --- a/src/dircolors.c +++ b/src/dircolors.c @@ -207,6 +207,13 @@ append_quoted (const char *str) { switch (*str) { + case '\'': + APPEND_CHAR ('\''); + APPEND_CHAR ('\\'); + APPEND_CHAR ('\''); + need_backslash = true; + break; + case '\\': case '^': need_backslash = !need_backslash; |