]> git.notmuchmail.org Git - notmuch/commitdiff
emacs: Ensure that message-directory for Fcc has a trailing slash
authorJesse Rosenthal <jrosenthal@jhu.edu>
Tue, 27 Apr 2010 03:08:34 +0000 (23:08 -0400)
committerCarl Worth <cworth@cworth.org>
Tue, 27 Apr 2010 06:06:54 +0000 (23:06 -0700)
Use `file-name-as-directory' to ensure that message-directory has a
trailing slash so it can be combined with the notmuch-fcc-dirs
correctly.

emacs/notmuch-maildir-fcc.el

index 6d75b118018c30d6cabf58ba9bbe4043e042d4ec..ecb65e7a48e8bf92640759b586042129ef50ec36 100644 (file)
@@ -71,7 +71,9 @@
           (cdr (assoc-string (message-fetch-field "from") notmuch-fcc-dirs t))))
      (if (eq subdir nil) (setq subdir (car (car notmuch-fcc-dirs))))
      (unless (message-fetch-field "fcc")
-       (message-add-header (concat "Fcc: " message-directory subdir)))
+       (message-add-header (concat "Fcc: " 
+                                  (file-name-as-directory message-directory) 
+                                  subdir)))
      (let ((fcc-header (message-fetch-field "fcc")))
      (unless (notmuch-maildir-fcc-dir-is-maildir-p fcc-header)
        (cond ((not (file-writable-p fcc-header))