don't use Subject for unknown part name
[claws.git] / src / mimeview.c
index d196550ec1e37ec697454d2a4f2d84f51a71ef81..2d76d813b8f25c6781c830b9dc5f2910a0d80154 100644 (file)
@@ -1004,15 +1004,12 @@ static void mimeview_save_as(MimeView *mimeview)
 {
        gchar *filename;
        gchar *defname = NULL;
-       MsgInfo *msginfo;
        MimeInfo *partinfo;
        gchar *res;
        const gchar *partname = NULL;
 
        if (!mimeview->opened) return;
        if (!mimeview->file) return;
-       if (!mimeview->messageview->msginfo) return;
-       msginfo = mimeview->messageview->msginfo;
 
        partinfo = mimeview_get_selected_part(mimeview);
        if (!partinfo) { 
@@ -1027,11 +1024,8 @@ static void mimeview_save_as(MimeView *mimeview)
        if (partname = procmime_mimeinfo_get_parameter(partinfo, "name")) {
                Xstrdup_a(defname, partname, return);
                subst_for_filename(defname);
-       } else if (msginfo->subject) {
-               Xstrdup_a(defname, msginfo->subject, return);
-               subst_for_filename(defname);
        }
-       
+
        filename = filesel_select_file(_("Save as"), defname);
        if (!filename) return;
        if (is_file_exist(filename)) {