Added missing \ character.

* glib/gshell.c: (g_shell_quote): Added missing \ character.

        * tests/shell-test.c: (check_string_result), (test_shell_unquote),
        (main): Added tests for g_shell_quote and g_shell_unquote.
This commit is contained in:
Darin Adler
2001-08-19 17:28:07 +00:00
parent cd793f2ced
commit 6d4342990a
10 changed files with 160 additions and 4 deletions

View File

@@ -198,7 +198,7 @@ g_shell_quote (const gchar *unquoted_string)
{
/* Replace literal ' with a close ', a \', and a open ' */
if (*p == '\'')
g_string_append (dest, "'\''");
g_string_append (dest, "'\\''");
else
g_string_append_c (dest, *p);