summaryrefslogtreecommitdiff
path: root/emacs/notmuch-maildir-fcc.el
diff options
context:
space:
mode:
Diffstat (limited to 'emacs/notmuch-maildir-fcc.el')
-rw-r--r--emacs/notmuch-maildir-fcc.el7
1 files changed, 5 insertions, 2 deletions
diff --git a/emacs/notmuch-maildir-fcc.el b/emacs/notmuch-maildir-fcc.el
index 64f60bc..34b1915 100644
--- a/emacs/notmuch-maildir-fcc.el
+++ b/emacs/notmuch-maildir-fcc.el
@@ -70,8 +70,11 @@
(let ((subdir
(cdr (assoc-string (message-fetch-field "from") notmuch-fcc-dirs t))))
(if (eq subdir nil) (setq subdir (car (car notmuch-fcc-dirs))))
- (message-remove-header "Fcc")
- (message-add-header (concat "Fcc: " message-directory subdir)))))
+ (unless (message-fetch-field "fcc")
+ (message-add-header (concat "Fcc: " message-directory subdir)))
+ (unless (notmuch-maildir-fcc-dir-is-maildir-p
+ (message-fetch-field "fcc"))
+ (error (format "%s is not a maildir." (message-fetch-field "fcc")))))))
(defun notmuch-maildir-fcc-host-fixer (hostname)
(replace-regexp-in-string "/\\|:"