[dovecot-cvs] dovecot/src/lib-storage/subscription-file subscription-file.c, 1.33.2.1, 1.33.2.2

tss at dovecot.org tss at dovecot.org
Wed Feb 14 18:32:26 UTC 2007


Update of /var/lib/cvs/dovecot/src/lib-storage/subscription-file
In directory talvi:/tmp/cvs-serv30676/subscription-file

Modified Files:
      Tag: branch_1_0
	subscription-file.c 
Log Message:
fsync() subscriptions file and maildir-keywords before rename()ing them.



Index: subscription-file.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-storage/subscription-file/Attic/subscription-file.c,v
retrieving revision 1.33.2.1
retrieving revision 1.33.2.2
diff -u -d -r1.33.2.1 -r1.33.2.2
--- subscription-file.c	28 Dec 2006 16:27:44 -0000	1.33.2.1
+++ subscription-file.c	14 Feb 2007 18:32:23 -0000	1.33.2.2
@@ -147,6 +147,12 @@
 		}
 	}
 
+	if (!failed && fsync(fd_out) < 0) {
+		mail_storage_set_critical(storage,
+			"fsync(%s) failed: %m", path);
+		failed = TRUE;
+	}
+
 	if (input != NULL)
 		i_stream_destroy(&input);
 	o_stream_destroy(&output);



More information about the dovecot-cvs mailing list