summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2005-10-19 07:32:14 +0000
committerJim Meyering <jim@meyering.net>2005-10-19 07:32:14 +0000
commitdee664c8bb921d0cab8f743a46cfced759fade3b (patch)
treec084a7f9a2cb6ce71db129c6aaa9caca0b28bec6 /src
parent21735a53583545c95107c9029b987d03d8244752 (diff)
downloadcoreutils-dee664c8bb921d0cab8f743a46cfced759fade3b.tar.xz
(append_quoted): Quote ' correctly.
Problem reported by Eric Blake.
Diffstat (limited to 'src')
-rw-r--r--src/dircolors.c7
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;