From 4ea21f54bb97c0204539760f74eb08323ecde63a Mon Sep 17 00:00:00 2001 From: Timo Sirainen Date: Tue, 15 Apr 2003 22:00:14 +0300 Subject: [PATCH] Use different warning message for dotlock mtime change. --HG-- branch : HEAD --- src/lib/file-dotlock.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) 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); -- 2.47.3