cid handle directory))
(throw 'found file)))
((equal (concat "<" cid ">") (mm-handle-id handle))
- (setq file (or (mm-handle-filename handle)
- (concat
- (make-temp-name "cid")
- (car (rassoc (car (mm-handle-type handle))
- mailcap-mime-extensions))))
- afile (expand-file-name file directory))
+ ;; Randomize filenames: declared filenames may not be unique.
+ (setq file (format "cid-%d-%s"
+ (random 99)
+ (or (mm-handle-filename handle)
+ (concat
+ (make-temp-name "cid")
+ (car (rassoc (car (mm-handle-type handle))
+ mailcap-mime-extensions)))))
+ afile (expand-file-name file directory))
(mm-save-part-to-file handle afile)
(throw 'found (concat (file-name-nondirectory
(directory-file-name directory))