GNOME Bugzilla – Bug 327521
"Save all" silently fails ...
Last modified: 2013-09-13 00:47:54 UTC
I have an attachment test.c and a file /tmp/test.c - I hit 'Save All': no prompting at all occurs; and the file is not saved. If I remove /tmp/test.c and repeat - it succeeds - again silently. There should be a dialog: "Overwrite test.: ?" " Yes / No / NoToAll / YesToAll" or whatever the HIG recommends I guess.
*** This bug has been marked as a duplicate of 316223 ***
Yes that code for asking if the user wants to overwrite or not. Instead it gives a gwarning() in terminal. So I added a patch .
Created attachment 58028 [details] [review] This patch asks the user whether he wants to overwrite a file or not and acts accordingly. I used the e_error_run((GtkWindow *)parent, E_ERROR_ASK_FILE_EXISTS_OVERWRITE, file_name, NULL) to prompt an error.
Comment on attachment 58028 [details] [review] This patch asks the user whether he wants to overwrite a file or not and acts accordingly. ? Evolution-Mail-common.c ? Evolution-Mail-common.lo ? Evolution-Mail-skels.c ? Evolution-Mail-skels.lo ? Evolution-Mail-stubs.c ? Evolution-Mail-stubs.lo ? Evolution-Mail.h ? Spell-common.lo ? Spell-skels.lo ? Spell-stubs.lo ? Unsaved Document 1.c ? e-searching-tokenizer.lo ? em-account-editor.lo ? em-account-prefs.lo ? em-composer-prefs.lo ? em-composer-utils.lo ? em-config.lo ? em-event.lo ? em-filter-context.lo ? em-filter-editor.lo ? em-filter-folder-element.lo ? em-filter-rule.lo ? em-filter-source-element.lo ? em-folder-browser.lo ? em-folder-properties.lo ? em-folder-selection-button.lo ? em-folder-selection.lo ? em-folder-selector.lo ? em-folder-tree-model.lo ? em-folder-tree.lo ? em-folder-utils.lo ? em-folder-view.lo ? em-format-hook.lo ? em-format-html-display.lo ? em-format-html-print.lo ? em-format-html.lo ? em-format-quote.lo ? em-format.lo ? em-html-stream.lo ? em-icon-stream.lo ? em-inline-filter.lo ? em-junk-hook.lo ? em-mailer-prefs.lo ? em-marshal.lo ? em-menu.lo ? em-message-browser.lo ? em-migrate.lo ? em-popup.lo ? em-search-context.lo ? em-stripsig-filter.lo ? em-subscribe-editor.lo ? em-sync-stream.lo ? em-utils.lo ? em-vfolder-context.lo ? em-vfolder-editor.lo ? em-vfolder-rule.lo ? em-vfs-stream.lo ? evolution-mail-2.6.schemas ? libevolution-mail.la ? mail-autofilter.lo ? mail-component-factory.lo ? mail-component.lo ? mail-config-factory.lo ? mail-config.lo ? mail-crypto.lo ? mail-folder-cache.lo ? mail-mt.lo ? mail-ops.lo ? mail-send-recv.lo ? mail-session.lo ? mail-signature-editor.lo ? mail-tools.lo ? mail-vfolder.lo ? mail.error ? message-list.lo ? message-tag-editor.lo ? message-tag-followup.lo ? patch.diff ? default/zh_CN/Makefile ? default/zh_CN/Makefile.in Index: em-utils.c =================================================================== RCS file: /cvs/gnome/evolution/mail/em-utils.c,v retrieving revision 1.73 diff -u -p -r1.73 em-utils.c --- em-utils.c 10 Jan 2006 08:10:30 -0000 1.73 +++ em-utils.c 24 Jan 2006 17:52:33 -0000 @@ -548,9 +548,11 @@ emu_save_parts_response (GtkWidget *file if (!g_file_test(file_path, (G_FILE_TEST_EXISTS))) mail_save_part(part, file_path, NULL, NULL); else - g_warning ("Could not save %s. File already exists", file_path); - - g_free (file_path); + if(e_error_run(NULL, E_ERROR_ASK_FILE_EXISTS_OVERWRITE, file_name, NULL)) + mail_save_part(part,file_path,NULL,NULL); + else + g_free (file_path); + g_free (safe_name); }
Comment on attachment 58028 [details] [review] This patch asks the user whether he wants to overwrite a file or not and acts accordingly. I used the e_error_run(NULL, E_ERROR_ASK_FILE_EXISTS_OVERWRITE, file_name, NULL) to prompt an error.