From 6e70784d67d550dc4fb2bfe25b826970231ae706 Mon Sep 17 00:00:00 2001 From: Chris Hanson Date: Mon, 5 Jun 2000 13:27:42 +0000 Subject: [PATCH] Fix bug: don't signal error if attachment lacks a filename parameter. --- v7/src/imail/imail-top.scm | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/v7/src/imail/imail-top.scm b/v7/src/imail/imail-top.scm index 9116a3a70..afeb93d3d 100644 --- a/v7/src/imail/imail-top.scm +++ b/v7/src/imail/imail-top.scm @@ -1,6 +1,6 @@ ;;; -*-Scheme-*- ;;; -;;; $Id: imail-top.scm,v 1.124 2000/06/03 02:11:02 cph Exp $ +;;; $Id: imail-top.scm,v 1.125 2000/06/05 13:27:42 cph Exp $ ;;; ;;; Copyright (c) 1999-2000 Massachusetts Institute of Technology ;;; @@ -1572,15 +1572,14 @@ With prefix argument, prompt even when point is on an attachment." (define (save-mime-attachment body selector message buffer) (let ((filename - (prompt-for-file "Save attachment as" - (list - (merge-pathnames - (filter-mime-attachment-filename - (mime-body-disposition-filename body)) - (or (buffer-get buffer - 'IMAIL-MIME-ATTACHMENT-DIRECTORY - #f) - (buffer-default-directory buffer))))))) + (prompt-for-file + "Save attachment as" + (let ((filename (mime-body-disposition-filename body))) + (and filename + (list + (merge-pathnames (filter-mime-attachment-filename filename) + (or (buffer-get buffer 'IMAIL-MIME-ATTACHMENT-DIRECTORY #f) + (buffer-default-directory buffer))))))))) (if (or (not (file-exists? filename)) (prompt-for-yes-or-no? "File already exists; overwrite")) (begin -- 2.25.1