[dovecot-cvs] dovecot/src/lib-storage/index/maildir maildir-list.c, 1.41, 1.42

cras at dovecot.org cras at dovecot.org
Fri Jun 16 12:26:08 EEST 2006


Update of /var/lib/cvs/dovecot/src/lib-storage/index/maildir
In directory talvi:/tmp/cvs-serv20303

Modified Files:
	maildir-list.c 
Log Message:
If file begins with ".nfs", stat() it always to see if it's a directory
since it may be a temporary file created by kernel.



Index: maildir-list.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-storage/index/maildir/maildir-list.c,v
retrieving revision 1.41
retrieving revision 1.42
diff -u -d -r1.41 -r1.42
--- maildir-list.c	1 Apr 2006 09:31:15 -0000	1.41
+++ maildir-list.c	16 Jun 2006 09:26:06 -0000	1.42
@@ -95,7 +95,9 @@
 			;
 		else
 #endif
-		if (stat_dirs) {
+		/* Check files beginning with .nfs always because they may be
+		   temporary files created by the kernel */
+		if (stat_dirs || strncmp(fname, ".nfs", 4) == 0) {
 			t_push();
 			path = t_strdup_printf("%s/%s", ctx->dir, fname);
 			hide = stat(path, &st) < 0 || !S_ISDIR(st.st_mode);



More information about the dovecot-cvs mailing list