(mm-handle-disposition handle) 'filename)
(mail-content-type-get
(mm-handle-type handle) 'name)))
- file)
+ file directory)
(when filename
(setq filename (gnus-map-function mm-file-name-rewrite-functions
(file-name-nondirectory filename))))
(setq file
(read-file-name
(or prompt
- (format "Save MIME part to (default %s): "
- (or filename "")))
- (or mm-default-directory default-directory)
- (expand-file-name (or filename "")
- (or mm-default-directory default-directory))))
+ (format "Save MIME part to%s: "
+ (if filename
+ (format " (default %s)" filename)
+ "")))
+ (or directory mm-default-directory default-directory)
+ (expand-file-name
+ (or filename "")
+ (or directory mm-default-directory default-directory))))
(cond ((or (not file) (equal file ""))
(message "Please enter a file name")
t)
((and (file-directory-p file)
(not filename))
+ (setq directory file)
(message "Please enter a non-directory file name")
t)
(t nil)))