aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhiro <hiro@ee746299-78ed-0310-b773-934348b2243d>2012-04-13 04:17:44 +0000
committerhiro <hiro@ee746299-78ed-0310-b773-934348b2243d>2012-04-13 04:17:44 +0000
commitdbee5233132b43b9e365a1189e8ddf6f4d1e9c7e (patch)
tree93d574f20e1023922e20fa9dda8ea9c6903637aa
parent90a9df8d5cf975b9ef0c276f6d951b99d8f8bbc4 (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--ChangeLog5
-rw-r--r--src/mimeview.c6
2 files changed, 9 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index d778bd81..0fb6eecf 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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;