From 6463df2dbb5c67fa9a39804ab414cd92f3d109b9 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Guelfucci?= <jeromeg@xfce.org>
Date: Wed, 12 Aug 2009 20:22:41 +0200
Subject: [PATCH] Fix opening of screenshots with an application.

A test was incorrect, and escaping the screenshot path is safer in
most cases.
---
 ChangeLog                 | 7 +++++++
 lib/screenshooter-utils.c | 5 +++--
 2 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index db867e0c..2b4163fb 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
 2009-08-12 jeromeg
 
+Fix opening of screenshots with an application.
+
+A test was incorrect, and escaping the screenshot path is safer in
+most cases.
+
+2009-08-12 jeromeg
+
 Add a scroll feature for the panel plugin.
 
 When scrolling the panel plugin button, the region to be
diff --git a/lib/screenshooter-utils.c b/lib/screenshooter-utils.c
index 5bd6386c..bdd36947 100644
--- a/lib/screenshooter-utils.c
+++ b/lib/screenshooter-utils.c
@@ -167,12 +167,13 @@ screenshooter_open_screenshot (const gchar *screenshot_path, const gchar *applic
 
   TRACE ("Path was != NULL");
 
-  if (!g_str_equal (application, "none"))
+  if (g_str_equal (application, "none"))
     return;
 
   TRACE ("Application was not none");
 
-  command = g_strconcat (application, " ", screenshot_path, NULL);
+  command = g_strconcat (application, " ",
+                         "\"", screenshot_path, "\"", NULL);
 
   TRACE ("Launch the command");
 
-- 
GitLab