From cb9170cfd3db558c35e85084bbfedfb1cb2889a8 Mon Sep 17 00:00:00 2001 From: "Taylor R. Campbell" Date: Mon, 11 Aug 2008 17:44:50 +0000 Subject: [PATCH] In GUARANTEE-IMAP-FOLDER-OPEN, send a SELECT command if the folder's messages are not synchronized. This fixes (with-open-resource folder-length) ;Value: 0 where is an IMAP URL for a folder that was recently open. --- v7/src/imail/imail-imap.scm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/v7/src/imail/imail-imap.scm b/v7/src/imail/imail-imap.scm index d18924314..ccc714a49 100644 --- a/v7/src/imail/imail-imap.scm +++ b/v7/src/imail/imail-imap.scm @@ -1,6 +1,6 @@ #| -*-Scheme-*- -$Id: imail-imap.scm,v 1.219 2008/05/19 05:21:19 riastradh Exp $ +$Id: imail-imap.scm,v 1.220 2008/08/11 17:44:50 riastradh Exp $ Copyright (C) 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, @@ -845,7 +845,8 @@ USA. (let ((connection (guarantee-imap-folder-connection folder)) (url (resource-locator folder))) (if (or (guarantee-imap-connection-open connection) - (not (eq? (imap-connection-url connection) url))) + (not (eq? (imap-connection-url connection) url)) + (not (imap-folder-messages-synchronized? folder))) (begin (set-imap-folder-messages-synchronized?! folder #f) (let ((selected? #f)) -- 2.25.1