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

cras at dovecot.org cras at dovecot.org
Sun Jun 11 14:19:39 EEST 2006


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

Modified Files:
      Tag: branch_1_0
	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.41.2.1
diff -u -d -r1.41 -r1.41.2.1
--- maildir-list.c	1 Apr 2006 09:31:15 -0000	1.41
+++ maildir-list.c	11 Jun 2006 11:19:37 -0000	1.41.2.1
@@ -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