After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 548020 - "create archive" directory selection not working correctly
"create archive" directory selection not working correctly
Status: RESOLVED FIXED
Product: file-roller
Classification: Applications
Component: general
2.23.x
Other Linux
: Normal minor
: ---
Assigned To: Paolo Bacchilega
file-roller-maint
Depends on:
Blocks:
 
 
Reported: 2008-08-16 13:45 UTC by Marcel Stimberg
Modified: 2008-08-16 14:45 UTC
See Also:
GNOME target: ---
GNOME version: 2.21/2.22


Attachments
patch for fixing the folder selection (512 bytes, patch)
2008-08-16 13:49 UTC, Marcel Stimberg
none Details | Review

Description Marcel Stimberg 2008-08-16 13:45:23 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.
Comment 1 Marcel Stimberg 2008-08-16 13:49:34 UTC
Created attachment 116744 [details] [review]
patch for fixing the folder selection
Comment 2 Marcel Stimberg 2008-08-16 13:50:00 UTC
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.


Comment 3 Paolo Bacchilega 2008-08-16 14:45:13 UTC
patch applied to trunk, thank you.