From: Taylor R. Campbell Date: Thu, 11 Sep 2008 17:49:09 +0000 (+0000) Subject: Fix bug in updating folder orders after a message is expunged. X-Git-Tag: 20090517-FFI~157 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=f7732d5d50b22bcc6147bef7631727d685592b69;p=mit-scheme.git Fix bug in updating folder orders after a message is expunged. --- diff --git a/v7/src/imail/imail-core.scm b/v7/src/imail/imail-core.scm index 280a24309..62eb06188 100644 --- a/v7/src/imail/imail-core.scm +++ b/v7/src/imail/imail-core.scm @@ -1,6 +1,6 @@ #| -*-Scheme-*- -$Id: imail-core.scm,v 1.175 2008/09/08 03:55:17 riastradh Exp $ +$Id: imail-core.scm,v 1.176 2008/09/11 17:49:09 riastradh Exp $ Copyright (C) 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, @@ -818,16 +818,11 @@ USA. (%message-order-key message order index) message))))))) ((EXPUNGE) - (let ((tree (folder-order-tree order))) - (if tree - (let ((message (car arguments)) - (%index (cadr arguments)) - (index (caddr arguments)) - (key (cadddr arguments))) - message index ;ignore - (let ((cache (folder-order-cache order))) - (if cache (hash-table/remove! cache %index))) - (wt-tree/delete! tree key))))))))))) + ;; Expunging a message may change the indices of + ;; existing messages, which invalidates our data + ;; structures, which were designed with UIDs, not + ;; sequence numbers, in mind. + (reset-folder-order! order)))))))) ;;;; Message flags