[eglib] Don't escape chars in argv parsing enclosed in single quotes (mono/mono#15047)
authorRyan Lucia <rylucia@microsoft.com>
Tue, 18 Jun 2019 17:30:31 +0000 (13:30 -0400)
committerGitHub <noreply@github.com>
Tue, 18 Jun 2019 17:30:31 +0000 (13:30 -0400)
Fixes mono/mono#14724

This may need to be reverted if customers are relying on the existing behavior, but we can cross that bridge when we come to it.

The larger issue of incompatibility with .NET Core should be addressed later.

Commit migrated from https://github.com/mono/mono/commit/6c5bbbd757344fa1a39922917c85091ee35dbe1e

src/mono/mono/eglib/gshell.c

index 6839eee..820ac46 100644 (file)
@@ -62,7 +62,7 @@ split_cmdline (const gchar *cmdline, GPtrArray *array, GError **gerror)
                                        g_ptr_array_add (array, g_string_free (str, FALSE));
                                        str = g_string_new ("");
                                }
-                       } else if (c == '\\'){
+                       } else if (c == '\\' && quote_char == '\"'){
                                escaped = TRUE;
                        } else 
                                g_string_append_c (str, c);