[gnome-screenshot] Escape folder name



commit 51b71b4f862fc1a2ddd54fee797b60fb1606dd4f
Author: Emilio Pozuelo Monfort <pochu27 gmail com>
Date:   Thu Dec 19 20:57:49 2013 +0100

    Escape folder name
    
    Patch by Ritesh Khadgaray <khadgaray gmail com>

 src/screenshot-application.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/src/screenshot-application.c b/src/screenshot-application.c
index 2d945cc..d2c622b 100644
--- a/src/screenshot-application.c
+++ b/src/screenshot-application.c
@@ -139,7 +139,8 @@ save_pixbuf_handle_error (ScreenshotApplication *self,
           !self->priv->should_overwrite)
         {
           gchar *folder = screenshot_dialog_get_folder (dialog);
-          gchar *folder_name = g_path_get_basename (folder);
+          gchar *folder_uri = g_path_get_basename (folder);
+          gchar *folder_name = g_uri_unescape_string (folder_uri, NULL);
           gchar *file_name = screenshot_dialog_get_filename (dialog);
           gchar *detail = g_strdup_printf (_("A file named \"%s\" already exists in \"%s\""),
                                            file_name, folder_name);
@@ -152,6 +153,7 @@ save_pixbuf_handle_error (ScreenshotApplication *self,
                                              detail);
 
           g_free (folder);
+          g_free (folder_uri);
           g_free (folder_name);
           g_free (file_name);
           g_free (detail);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]