From: Timo Sirainen Date: Tue, 15 Apr 2003 19:00:14 +0000 (+0300) Subject: Use different warning message for dotlock mtime change. X-Git-Tag: 1.1.alpha1~4747 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4ea21f54bb97c0204539760f74eb08323ecde63a;p=thirdparty%2Fdovecot%2Fcore.git Use different warning message for dotlock mtime change. --HG-- branch : HEAD --- diff --git a/src/lib/file-dotlock.c b/src/lib/file-dotlock.c index 4f57ba0a3c..699abb1b9b 100644 --- a/src/lib/file-dotlock.c +++ b/src/lib/file-dotlock.c @@ -279,12 +279,17 @@ int file_unlock_dotlock(const char *path, const struct dotlock *dotlock) } if (dotlock->ino != st.st_ino || - !CMP_DEV_T(dotlock->dev, st.st_dev) || - dotlock->mtime != st.st_mtime) { + !CMP_DEV_T(dotlock->dev, st.st_dev)) { i_warning("Our dotlock file %s was overridden", lock_path); return 0; } + if (dotlock->mtime != st.st_mtime) { + i_warning("Our dotlock file %s was modified (%s vs %s), " + "assuming it wasn't overridden", lock_path, + dec2str(dotlock->mtime), dec2str(st.st_mtime)); + } + if (unlink(lock_path) < 0) { if (errno == ENOENT) { i_warning("Our dotlock file %s was deleted", lock_path);