[dovecot-cvs] dovecot/src/plugins/quota quota-maildir.c,1.2,1.3

tss-movial at dovecot.org tss-movial at dovecot.org
Mon Mar 6 21:04:28 EET 2006


Update of /var/lib/cvs/dovecot/src/plugins/quota
In directory talvi:/tmp/cvs-serv2786

Modified Files:
	quota-maildir.c 
Log Message:
Fixes to updating maildirsize.



Index: quota-maildir.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/plugins/quota/quota-maildir.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- quota-maildir.c	6 Mar 2006 15:48:33 -0000	1.2
+++ quota-maildir.c	6 Mar 2006 19:04:25 -0000	1.3
@@ -457,6 +457,9 @@
 	const char *str;
 	int ret = 0;
 
+	if (count_diff == 0 && bytes_diff == 0)
+		return 0;
+
 	t_push();
 
 	/* We rely on O_APPEND working in here. That isn't NFS-safe, but it
@@ -464,7 +467,7 @@
 	   a while, and sooner if corruption cases calculations to go
 	   over quota. This is also how Maildir++ spec specifies it should be
 	   done.. */
-	str = t_strdup_printf("%d %lld\n", count_diff, (long long)bytes_diff);
+	str = t_strdup_printf("%lld %d\n", (long long)bytes_diff, count_diff);
 	if (write_full(root->fd, str, strlen(str)) < 0) {
 		ret = -1;
 		if (errno == ESTALE) {



More information about the dovecot-cvs mailing list