From: hmurata Date: Sat, 15 Nov 2003 05:11:16 +0000 (+0000) Subject: (wl-summary-burst): Check target folder is writable. X-Git-Tag: wl-2_11_21~9 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=439dfbe8b8765e5bb754cf4ad808faac201282e5;p=elisp%2Fwanderlust.git (wl-summary-burst): Check target folder is writable. --- diff --git a/wl/ChangeLog b/wl/ChangeLog index a7cf5ae..877803c 100644 --- a/wl/ChangeLog +++ b/wl/ChangeLog @@ -1,3 +1,7 @@ +2003-11-15 Hiroya Murata + + * wl-mime.el (wl-summary-burst): Check target folder is writable. + 2003-11-14 Tetsurou Okazaki * wl-folder.el (wl-folder-update-unread): Re-indent. diff --git a/wl/wl-mime.el b/wl/wl-mime.el index df39d97..45e1579 100644 --- a/wl/wl-mime.el +++ b/wl/wl-mime.el @@ -505,15 +505,23 @@ With ARG, ask destination folder." (interactive "P") (let ((raw-buf (wl-summary-get-original-buffer)) (view-buf wl-message-buffer) - children message-entity content-type target-name target) + message-entity target) (save-excursion - (setq target wl-summary-buffer-elmo-folder) - (when (or arg (not (elmo-folder-writable-p target))) - (setq target-name (wl-summary-read-folder wl-default-folder "to extract to")) - (setq target (wl-folder-get-elmo-folder target-name))) + (when (and (null arg) + (elmo-folder-writable-p wl-summary-buffer-elmo-folder)) + (setq target wl-summary-buffer-elmo-folder)) + (while (null target) + (let ((name (wl-summary-read-folder wl-default-folder + "to extract to"))) + (setq target (wl-folder-get-elmo-folder name)) + (unless (elmo-folder-writable-p target) + (message "%s is not writable" name) + (setq target nil) + (sit-for 1)))) (wl-summary-set-message-buffer-or-redisplay) (with-current-buffer view-buf - (setq message-entity (get-text-property (point-min) 'mime-view-entity))) + (setq message-entity + (get-text-property (point-min) 'mime-view-entity))) (when message-entity (message "Bursting...") (with-current-buffer raw-buf @@ -521,8 +529,9 @@ With ARG, ask destination folder." (message "Bursting...done")) (if (elmo-folder-plugged-p target) (elmo-folder-check target))) - (when (or (not target-name) - (string= wl-summary-buffer-folder-name target-name)) + (when (and target + (string= wl-summary-buffer-folder-name + (elmo-folder-name-internal target))) (save-excursion (wl-summary-sync-update))))) ;; internal variable.