Don't call SAVE-RESOURCE in DISCARD-FOLDER-CACHE on file folders.
authorTaylor R Campbell <campbell@mumble.net>
Tue, 14 Jul 2009 20:50:35 +0000 (16:50 -0400)
committerTaylor R Campbell <campbell@mumble.net>
Tue, 14 Jul 2009 20:50:35 +0000 (16:50 -0400)
DISCARD-FOLDER-CACHE is called only when we want to discard changes.

src/imail/imail-file.scm

index 55fbb77405eb616e74f16afce12d0e133c55ae9b..3fcdecaae3a4411f1ffe3411a4326f0b33fcc689 100644 (file)
@@ -277,8 +277,7 @@ USA.
 (define-method close-resource ((folder <file-folder>) no-defer?)
   no-defer?
   (save-resource folder)
-  (discard-file-folder-messages folder)
-  (discard-file-folder-xstring folder))
+  (discard-folder-cache folder))
 
 (define (discard-file-folder-messages folder)
   (without-interrupts
@@ -452,7 +451,8 @@ USA.
       (call-with-input-xstring (file-folder-xstring folder) 0 reader)))))
 \f
 (define-method discard-folder-cache ((folder <file-folder>))
-  (close-resource folder #f))
+  (discard-file-folder-messages folder)
+  (discard-file-folder-xstring folder))
 
 (define-method probe-folder ((folder <file-folder>))
   folder