changeset 5590:eb4902fc7693 HEAD

Give a better error message if dotlock is deleted immediately under us (or more likely an OS bug).
author Timo Sirainen <tss@iki.fi>
date Fri, 11 May 2007 17:07:04 +0300
parents 271c35971331
children cf45e0fdcf52
files src/lib/file-dotlock.c
diffstat 1 files changed, 6 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/lib/file-dotlock.c	Fri May 11 16:29:25 2007 +0300
+++ b/src/lib/file-dotlock.c	Fri May 11 17:07:04 2007 +0300
@@ -523,7 +523,12 @@
 	/* some NFS implementations may have used cached mtime in previous
 	   fstat() call. Check again to avoid "dotlock was modified" errors. */
 	if (stat(lock_path, &st) < 0) {
-		i_error("stat(%s) failed: %m", lock_path);
+		if (errno != ENOENT)
+			i_error("stat(%s) failed: %m", lock_path);
+		else {
+			i_error("dotlock %s was immediately deleted under us",
+				lock_path);
+		}
                 file_dotlock_free(dotlock);
 		t_pop();
 		return -1;