diff options
author | hiro <hiro@ee746299-78ed-0310-b773-934348b2243d> | 2012-04-13 04:17:44 +0000 |
---|---|---|
committer | hiro <hiro@ee746299-78ed-0310-b773-934348b2243d> | 2012-04-13 04:17:44 +0000 |
commit | dbee5233132b43b9e365a1189e8ddf6f4d1e9c7e (patch) | |
tree | 93d574f20e1023922e20fa9dda8ea9c6903637aa | |
parent | 90a9df8d5cf975b9ef0c276f6d951b99d8f8bbc4 (diff) |
fixed a bug that a MIME part that didn't have a name could not be saved.
git-svn-id: svn://sylpheed.sraoss.jp/sylpheed/trunk@3044 ee746299-78ed-0310-b773-934348b2243d
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | src/mimeview.c | 6 |
2 files changed, 9 insertions, 2 deletions
@@ -1,5 +1,10 @@ 2012-04-13 + * src/mimeview.c: mimeview_save_part_as(): fixed a bug that a MIME + part that didn't have a name could not be saved. + +2012-04-13 + * libsylph/prefs_common.[ch] src/filesel.[ch]: preserve the last selected folders between sessions. diff --git a/src/mimeview.c b/src/mimeview.c index b4a84a93..c097e614 100644 --- a/src/mimeview.c +++ b/src/mimeview.c @@ -1192,7 +1192,6 @@ void mimeview_open_part_with(MimeView *mimeview, MimeInfo *partinfo) void mimeview_save_part_as(MimeView *mimeview, MimeInfo *partinfo) { gchar *filename = NULL; - gchar *defname = NULL; g_return_if_fail(partinfo != NULL); @@ -1201,11 +1200,14 @@ void mimeview_save_part_as(MimeView *mimeview, MimeInfo *partinfo) if (partinfo->filename) { filename = filesel_save_as(partinfo->filename); } else if (partinfo->name) { + gchar *defname; + defname = g_strdup(partinfo->name); subst_for_filename(defname); filename = filesel_save_as(defname); g_free(defname); - } + } else + filename = filesel_save_as(NULL); if (!filename) return; |