[dovecot-cvs] dovecot/src/lib file-dotlock.c,1.40,1.41

tss at dovecot.org tss at dovecot.org
Wed Apr 11 14:19:27 EEST 2007


Update of /var/lib/cvs/dovecot/src/lib
In directory talvi:/tmp/cvs-serv26097

Modified Files:
	file-dotlock.c 
Log Message:
Use lstat() instead of stat() to check if temporary file already exists.



Index: file-dotlock.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib/file-dotlock.c,v
retrieving revision 1.40
retrieving revision 1.41
diff -u -d -r1.40 -r1.41
--- file-dotlock.c	17 Mar 2007 15:29:26 -0000	1.40
+++ file-dotlock.c	11 Apr 2007 11:19:25 -0000	1.41
@@ -281,7 +281,7 @@
 			str_truncate(path, len);
 			str_append(path,
 				   binary_to_hex(randbuf, sizeof(randbuf)));
-		} while (stat(str_c(path), &st) == 0);
+		} while (lstat(str_c(path), &st) == 0);
 
 		if (errno != ENOENT) {
 			i_error("stat(%s) failed: %m", str_c(path));



More information about the dovecot-cvs mailing list