aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuilhem Moulin <guilhem@fripost.org>2019-11-15 22:20:40 +0100
committerGuilhem Moulin <guilhem@fripost.org>2019-11-15 22:22:55 +0100
commit51336e88f2de76c56b513de23d06677461742454 (patch)
treeacd8cfaa258a1688516dd725441b6e99b54c442b
parent9a2d877628905447ee2ea09cf994b19c596b2ba4 (diff)
Improve “UIDVALIDITY changed!” error message.
Mention the name of the problematic mailbox. (We may detect the violation while not in SELECTED state.)
-rw-r--r--lib/Net/IMAP/InterIMAP.pm4
-rw-r--r--tests/resume/t2
2 files changed, 3 insertions, 3 deletions
diff --git a/lib/Net/IMAP/InterIMAP.pm b/lib/Net/IMAP/InterIMAP.pm
index ef1c20b..1bff06e 100644
--- a/lib/Net/IMAP/InterIMAP.pm
+++ b/lib/Net/IMAP/InterIMAP.pm
@@ -1111,7 +1111,7 @@ sub set_cache($$%) {
if ($k eq 'UIDVALIDITY') {
# try to detect UIDVALIDITY changes early (before starting the sync)
$self->fail("UIDVALIDITY changed! ($cache->{UIDVALIDITY} != $v) ".
- "Need to invalidate the UID cache.")
+ "Need to invalidate the UID cache for $mailbox.")
if defined $cache->{UIDVALIDITY} and $cache->{UIDVALIDITY} != $v;
}
$cache->{$k} = $v;
@@ -1819,7 +1819,7 @@ sub _update_cache_for($$%) {
if ($k eq 'UIDVALIDITY') {
# try to detect UIDVALIDITY changes early (before starting the sync)
$self->fail("UIDVALIDITY changed! ($cache->{UIDVALIDITY} != $v) ".
- "Need to invalidate the UID cache.")
+ "Need to invalidate the UID cache for $mailbox.")
if defined $cache->{UIDVALIDITY} and $cache->{UIDVALIDITY} != $v;
$self->{_PCACHE}->{$mailbox}->{UIDVALIDITY} //= $v;
}
diff --git a/tests/resume/t b/tests/resume/t
index cb0208c..a281ef3 100644
--- a/tests/resume/t
+++ b/tests/resume/t
@@ -38,7 +38,7 @@ doveadm -u "remote" mailbox status "all" "foo" >"$TMPDIR/foo.remote"
! interimap || error
grep -Fx "Resuming interrupted sync for foo" <"$STDERR"
-grep -Fx "local(foo): ERROR: UIDVALIDITY changed! ($uidvalidity2 != $uidvalidity) Need to invalidate the UID cache." <"$STDERR"
+grep -Fx "local(foo): ERROR: UIDVALIDITY changed! ($uidvalidity2 != $uidvalidity) Need to invalidate the UID cache for foo." <"$STDERR"
sqlite3 "$XDG_DATA_HOME/interimap/remote.db" >"$TMPDIR/dump2.sql" <<-EOF
.dump