[xarchiver] Fix extraction failures when the Drag'n'Drop target path contains spaces (#784075)

Jaromír Cápík jcapik at fedoraproject.org
Thu Jan 26 12:33:17 UTC 2012


commit 9bcbb09950aa146381d614d91172604c3575b800
Author: Jaromir Capik <jcapik at redhat.com>
Date:   Thu Jan 26 13:33:01 2012 +0100

    Fix extraction failures when the Drag'n'Drop target path contains spaces (#784075)

 xarchiver-0.5.2-drag-n-drop_escaped_path.patch |   13 +++++++++++++
 xarchiver.spec                                 |    9 ++++++++-
 2 files changed, 21 insertions(+), 1 deletions(-)
---
diff --git a/xarchiver-0.5.2-drag-n-drop_escaped_path.patch b/xarchiver-0.5.2-drag-n-drop_escaped_path.patch
new file mode 100644
index 0000000..10def7d
--- /dev/null
+++ b/xarchiver-0.5.2-drag-n-drop_escaped_path.patch
@@ -0,0 +1,13 @@
+diff -Naur xarchiver-0.5.2.orig/src/window.c xarchiver-0.5.2/src/window.c
+--- xarchiver-0.5.2.orig/src/window.c	2012-01-12 13:28:54.000000000 +0100
++++ xarchiver-0.5.2/src/window.c	2012-01-23 20:43:49.622745851 +0100
+@@ -1724,6 +1724,9 @@
+ 			gtk_tree_selection_selected_foreach (selection,(GtkTreeSelectionForeachFunc) xa_concat_selected_filenames,&names);
+ 			archive->full_path = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON (extract_window->extract_full));
+ 			archive->overwrite = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON (extract_window->overwrite_check));
++			gchar *unescaped_extraction_path = archive->extraction_path;
++			archive->extraction_path = xa_escape_filename(unescaped_extraction_path, "$'`\"\\!?* ()[]&|:;<>#");
++			g_free(unescaped_extraction_path);
+ 			(*archive->extract) (archive,names);
+ 
+ 			g_list_foreach (row_list,(GFunc) gtk_tree_path_free,NULL);
diff --git a/xarchiver.spec b/xarchiver.spec
index ba214b5..8c7a831 100644
--- a/xarchiver.spec
+++ b/xarchiver.spec
@@ -1,6 +1,6 @@
 Name:           xarchiver
 Version:        0.5.2
-Release:        12%{?dist}
+Release:        13%{?dist}
 Summary:        Archive manager for Xfce
 
 Group:          Applications/Archiving
@@ -27,6 +27,9 @@ Patch4:         xarchiver-0.5.2-segfault-open-with.patch
 # fix-7z-support.patch by taken from
 # https://sourceforge.net/tracker/?func=detail&aid=3137589&group_id=140153&atid=745602
 Patch5:         xarchiver-0.5.2-fix_7z_support.patch
+# rhbz#784075 - extraction fails when the Drag'n'Drop target path contains spaces
+Patch6:         xarchiver-0.5.2-drag-n-drop_escaped_path.patch
+
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
 BuildRequires:  gtk2-devel, libxml2-devel, gettext, desktop-file-utils
@@ -50,6 +53,7 @@ chmod -x src/mime.*
 %patch3 -p1 -b .rpm2cpio
 %patch4 -p1 -b .segfault-open-with
 %patch5 -p1 -b .fix_7z_support
+%patch6 -p1 -b .dnd_escaped_path
 
 %build
 %configure
@@ -119,6 +123,9 @@ rm -rf $RPM_BUILD_ROOT
 
 
 %changelog
+* Thu Jan 26 2012 Jaromir Capik <jcapik at redhat.com> - 0.5.2-13
+- Fix extraction failures when the Drag'n'Drop target path contains spaces (#784075)
+
 * Sat Jan 14 2012 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 0.5.2-12
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
 


More information about the scm-commits mailing list