[dovecot-cvs] dovecot/src/lib-index mail-index-compress.c,1.17,1.18

cras at procontrol.fi cras at procontrol.fi
Thu Oct 24 21:24:02 EEST 2002


Update of /home/cvs/dovecot/src/lib-index
In directory danu:/tmp/cvs-serv17167

Modified Files:
	mail-index-compress.c 
Log Message:
fdatasync() before close().



Index: mail-index-compress.c
===================================================================
RCS file: /home/cvs/dovecot/src/lib-index/mail-index-compress.c,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -d -r1.17 -r1.18
--- mail-index-compress.c	24 Oct 2002 01:47:58 -0000	1.17
+++ mail-index-compress.c	24 Oct 2002 17:24:00 -0000	1.18
@@ -208,13 +208,13 @@
 
 	failed = !mail_index_copy_data(index, fd, temppath);
 
-	if (close(fd) < 0) {
-		index_file_set_syscall_error(index, temppath, "close()");
+	if (fdatasync(fd) < 0) {
+		index_file_set_syscall_error(index, temppath, "fdatasync()");
 		failed = TRUE;
 	}
 
-	if (fdatasync(fd) < 0) {
-		index_file_set_syscall_error(index, temppath, "fdatasync()");
+	if (close(fd) < 0) {
+		index_file_set_syscall_error(index, temppath, "close()");
 		failed = TRUE;
 	}
 




More information about the dovecot-cvs mailing list