From: Chris Hanson Date: Mon, 5 Jun 2000 13:27:42 +0000 (+0000) Subject: Fix bug: don't signal error if attachment lacks a filename parameter. X-Git-Tag: 20090517-FFI~3616 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=6e70784d67d550dc4fb2bfe25b826970231ae706;p=mit-scheme.git Fix bug: don't signal error if attachment lacks a filename parameter. --- 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