GNOME Bugzilla – Bug 548020
"create archive" directory selection not working correctly
Last modified: 2008-08-16 14:45:13 UTC
This bug is from the Ubuntu bug tracker (was reported for 2.22 but is still there in the SVN trunk): https://bugs.launchpad.net/ubuntu/+source/file-roller/+bug/230044 To reproduce: 1. Right-click on a folder that is not a subdirectory of /tmp in Nautilus and choose "create archive" 2. choose "Other..." from the location menu. 3. Type "/tmp" <return>. 4. Click "create" The archive will be created in the directory that contains the folder you clicked, instead of in /tmp. Similar problem when you go to "file system" and only select tmp (i.e. no double click), file-roller tries to create the archive in /, failing due to the insufficient permissions. The problem arises from using the current and not the selected folder. I'll attach a simple fix.
Created attachment 116744 [details] [review] patch for fixing the folder selection
The attached patch fixes the issue for me. From GtkFileChooser doc: gtk_file_chooser_get_current_folder_uri(): Note that this is the folder that the file chooser is currently displaying...which is not the same as the currently-selected folder if the chooser is in GTK_FILE_CHOOSER_SELECT_FOLDER mode. To get the currently-selected folder in that mode, use gtk_file_chooser_get_uri() as the usual way to get the selection.
patch applied to trunk, thank you.