[smuxi/stable] Frontend: quote " and ' properly in /exec
- From: Mirco M. M. Bauer <mmmbauer src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [smuxi/stable] Frontend: quote " and ' properly in /exec
- Date: Sun, 12 Jan 2014 07:24:16 +0000 (UTC)
commit f93ab982882d413e18414b59ffbf716d4a904f61
Author: Mirco Bauer <meebey meebey net>
Date: Fri Jan 3 00:38:50 2014 +0100
Frontend: quote " and ' properly in /exec
We can't pass quoted ' to sh thus we need to use " quoting instead.
src/Frontend/CommandManager.cs | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/Frontend/CommandManager.cs b/src/Frontend/CommandManager.cs
index 369cc35..6e3773b 100644
--- a/src/Frontend/CommandManager.cs
+++ b/src/Frontend/CommandManager.cs
@@ -244,8 +244,8 @@ namespace Smuxi.Frontend
string args = null;
if (Environment.OSVersion.Platform == PlatformID.Unix) {
file = "sh";
- args = String.Format("-c '{0}'",
- parameter.Replace("'", @"\'"));
+ args = String.Format("-c \"{0}\"",
+ parameter.Replace("\"", @"\"""));
} else {
file = parameters[1];
if (parameters.Length > 1) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]