From e39bf89834f3dcdc73414d683c1bcbbdf1cf8350 Mon Sep 17 00:00:00 2001 From: Matthias Andree Date: Fri, 20 Jan 2006 10:42:11 +0000 Subject: don't complain about READ-ONLY IMAP folders in --fetchall --keep mode. Reported Alexander Zangerl, Debian Bug#348964. svn path=/branches/BRANCH_6-3/; revision=4665 --- imap.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'imap.c') diff --git a/imap.c b/imap.c index b78abb30..68e87eb8 100644 --- a/imap.c +++ b/imap.c @@ -697,6 +697,11 @@ static int imap_getrange(int sock, ok = gen_transact(sock, check_only ? "EXAMINE \"%s\"" : "SELECT \"%s\"", folder ? folder : "INBOX"); + /* imap_ok returns PS_LOCKBUSY for READ-ONLY folders, + * which we can safely use in fetchall keep only */ + if (ok == PS_LOCKBUSY && ctl->fetchall && ctl-> keep) + ok = 0; + if (ok != 0) { report(stderr, GT_("mailbox selection failed\n")); -- cgit v1.2.3