aboutsummaryrefslogtreecommitdiffstats
path: root/mail
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@ximian.com>2003-04-02 02:23:57 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2003-04-02 02:23:57 +0800
commit138b676757ffa2bfcfe8146d73af519fb77aaaed (patch)
tree22ddf75372b778b622f6bc5733eac645fce539b5 /mail
parentd10e8990d806eabaf8720b1532d33f335486df43 (diff)
downloadgsoc2013-evolution-138b676757ffa2bfcfe8146d73af519fb77aaaed.tar
gsoc2013-evolution-138b676757ffa2bfcfe8146d73af519fb77aaaed.tar.gz
gsoc2013-evolution-138b676757ffa2bfcfe8146d73af519fb77aaaed.tar.bz2
gsoc2013-evolution-138b676757ffa2bfcfe8146d73af519fb77aaaed.tar.lz
gsoc2013-evolution-138b676757ffa2bfcfe8146d73af519fb77aaaed.tar.xz
gsoc2013-evolution-138b676757ffa2bfcfe8146d73af519fb77aaaed.tar.zst
gsoc2013-evolution-138b676757ffa2bfcfe8146d73af519fb77aaaed.zip
Don't allow the 'prefix' argument to make_safe_filename() be NULL. If we
2003-04-01 Jeffrey Stedfast <fejj@ximian.com> * mail-display.c (save_part): Don't allow the 'prefix' argument to make_safe_filename() be NULL. If we don't yet have a save_dir in gconf, use $HOME, etc. Fixes bug #40608. svn path=/trunk/; revision=20621
Diffstat (limited to 'mail')
-rw-r--r--mail/ChangeLog10
-rw-r--r--mail/mail-display.c10
2 files changed, 15 insertions, 5 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index e526ce6f01..77489db490 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,3 +1,9 @@
+2003-04-01 Jeffrey Stedfast <fejj@ximian.com>
+
+ * mail-display.c (save_part): Don't allow the 'prefix' argument to
+ make_safe_filename() be NULL. If we don't yet have a save_dir in
+ gconf, use $HOME, etc. Fixes bug #40608.
+
2003-04-02 Not Zed <NotZed@Ximian.com>
* component-factory.c (interactive_cb): Call
@@ -12,6 +18,10 @@
2003-03-31 Jeffrey Stedfast <fejj@ximian.com>
+ * message-list.c (regen_list_regened): Save tree state and then
+ after building the new tree, re-load the tree state. Finishes the
+ fix for bug #40074.
+
* mail-session.c: Properly init message_list. Fixed a type-o that
initialized it to the password_list.
diff --git a/mail/mail-display.c b/mail/mail-display.c
index 657275df98..ec847e84c6 100644
--- a/mail/mail-display.c
+++ b/mail/mail-display.c
@@ -211,7 +211,7 @@ write_data_to_file (CamelMimePart *part, const char *name, gboolean unique)
}
static char *
-make_safe_filename (const char *prefix,CamelMimePart *part)
+make_safe_filename (const char *prefix, CamelMimePart *part)
{
const char *name;
char *safe, *p;
@@ -318,19 +318,19 @@ on_link_clicked (GtkHTML *html, const char *url, MailDisplay *md)
static void
save_part (CamelMimePart *part)
{
+ char *filename, *dir, *home, *base;
GtkFileSelection *file_select;
- char *filename, *dir, *base;
GConfClient *gconf;
camel_object_ref (part);
+ home = getenv ("HOME");
gconf = gconf_client_get_default ();
dir = gconf_client_get_string (gconf, "/apps/evolution/mail/save_dir", NULL);
- filename = make_safe_filename (dir, part);
+ filename = make_safe_filename (dir ? dir : (home ? home : ""), part);
g_free (dir);
- file_select = GTK_FILE_SELECTION (
- gtk_file_selection_new (_("Save Attachment")));
+ file_select = GTK_FILE_SELECTION (gtk_file_selection_new (_("Save Attachment")));
gtk_file_selection_set_filename (file_select, filename);
/* set the GtkEntry with the locale filename by breaking abstraction */
base = g_path_get_basename (filename);