changeset 4461:ce727f4e53e5 HEAD

mail_get_physical_size() was broken with non-committed mails, which broke quota plugin.
author Timo Sirainen <tss@iki.fi>
date Sat, 01 Jul 2006 20:53:55 +0300
parents 80943d914681
children de27599764c1
files src/lib-storage/index/maildir/maildir-mail.c
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/lib-storage/index/maildir/maildir-mail.c	Sat Jul 01 20:45:17 2006 +0300
+++ b/src/lib-storage/index/maildir/maildir-mail.c	Sat Jul 01 20:53:55 2006 +0300
@@ -236,6 +236,7 @@
 			_mail->expunged = TRUE;
 			return (uoff_t)-1;
 		}
+		path = NULL;
 	} else {
 		path = maildir_save_file_get_path(_mail->transaction,
 						  _mail->seq);
@@ -251,7 +252,7 @@
 				return (uoff_t)-1;
 		} else {
 			/* saved mail which hasn't been committed yet */
-			if (do_stat(mbox, fname, &st) <= 0)
+			if (do_stat(mbox, path, &st) <= 0)
 				return (uoff_t)-1;
 		}
 		size = st.st_size;