From: Jim Meyering Date: Wed, 19 Oct 2005 07:32:14 +0000 (+0000) Subject: (append_quoted): Quote ' correctly. X-Git-Tag: v5.92~14 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=dee664c8bb921d0cab8f743a46cfced759fade3b;p=thirdparty%2Fcoreutils.git (append_quoted): Quote ' correctly. Problem reported by Eric Blake. --- diff --git a/src/dircolors.c b/src/dircolors.c index 19bdd3335e..ace0d78a55 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;