GNOME Bugzilla – Bug 423766
Saving mail attachments doesn't work properly in 2.10
Last modified: 2007-04-19 19:51:11 UTC
Forwarding from a downstream bug report: http://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=234315 I have an email message (in an Exchange folder, although I don't know if that makes a difference) with an attachment called zones.tar. I click "Save" and it pops up a dialog. In the "Location" field, I enter "/tmp/zones.tar" and hit Enter. Instead of creating the file /tmp/zones.tar, it creates an empty directory called /tmp/zones.tar and doesn't save the attachment. Next, I try simply popping up the save dialog and clicking the "Save" button, which presumably should save the file in my home directory since that's what's selected in the Places list if I don't change anything. It does in fact save the file in my home directory, but the dialog remains popped up instead of dismissing. I'm using evolution-2.10.0-2.fc7.
I'm confirming this. It's a regression from Evolution 2.8.
The first paragraph actually describes two bugs. Whether saving one or many attachments, Evolution asks the user to select a folder. This is confusing behavior, as shown by what the reporter expected to happen. When saving one attachment, the GtkFileChooser should be in SAVE mode, not SELECT_FOLDER mode. The second bug was introduced by bug #349966. When saving multiple attachments, Evolution is using gtk_file_chooser_get_current_folder_uri() to get the URI of the user-selected folder. But that functions returns the currently DISPLAYED folder, not the currently SELECTED folder. So when the reporter typed "tmp/zones.tar" (which is actually a folder path), Evolution correctly created the user-selected folder but saved the attachment into the displayed folder (which I'm guessing was his home directory). I've not been able to reproduce the behavior described in the second paragraph. The reporter claims that the attachment was corrected saved in his home directory, but I suspect the file may have already been there as a side-effect of the first attempt.
Created attachment 86342 [details] [review] Proposed patch Patch for the reproducible parts of this bug. In the course of debugging this I also refactored em_utils_save_part() and em_utils_save_parts(), fixing a few subtle bugs along the way.
Some Alignment issues + GtkWidget *file_chooser; Looks fine other wise. Please commit to HEAD only. It has a new string _("Save attachment as")
Patch committed to Subversion trunk (revision 33429).
Created attachment 86560 [details] [review] Proposed patch for gnome-2-18 Here's a more conservative patch for the stable gnome-2-18 branch. It replaces gtk_file_chooser_get_current_folder_uri() with gtk_file_chooser_get_uri() when using a GtkFileChooser in SELECT_FOLDER mode.
Please commit.
Committed to the gnome-2-18 branch (revision 33433).