Correctly get the number of the appended message
authordmaus <dmaus>
Wed, 30 Nov 2011 10:07:12 +0000 (10:07 +0000)
committerdmaus <dmaus>
Wed, 30 Nov 2011 10:07:12 +0000 (10:07 +0000)
* elmo-maildir.el (elmo-folder-append-buffer): Correctly get the
number of the appended message.

elmo/ChangeLog
elmo/elmo-maildir.el

index b8fe321..2d8a602 100644 (file)
@@ -1,3 +1,8 @@
+2011-11-30  David Maus  <dmaus@ictsoc.de>
+
+       * elmo-maildir.el (elmo-folder-append-buffer): Correctly get the
+       number of the appended message.
+
 2011-06-03  David Maus  <dmaus@ictsoc.de>
 
        * elmo-imap4.el (elmo-imap4-fetch-callback-1-subr): Don't mark
index 1a10de5..9b3645f 100644 (file)
@@ -434,6 +434,7 @@ file name for maildir directories."
                                               return-number)
   (let ((basedir (elmo-maildir-folder-directory-internal folder))
        (src-buf (current-buffer))
+       (number (elmo-folder-next-message-number folder))
        dst-buf filename)
     (condition-case nil
        (with-temp-buffer
@@ -450,9 +451,7 @@ file name for maildir directories."
            basedir))
          (elmo-folder-preserve-flags
           folder (elmo-msgdb-get-message-id-from-buffer) flags)
-         (if return-number
-             (car (elmo-folder-status folder))
-           t))
+         (if return-number number t))
       ;; If an error occured, return nil.
       (error))))