From 944aed1511a2b67e3a36c166f434f0fc48bafd96 Mon Sep 17 00:00:00 2001 From: teranisi Date: Fri, 1 Apr 2005 03:06:43 +0000 Subject: [PATCH] * elmo.el (elmo-folder-synchronize): Clear msgdb even when an error occured while updating flag table. * modb-standard.el (modb-standard-load-entity): Cause an error when entity format is for 2.15.0 or later. --- elmo/ChangeLog | 8 ++++++++ elmo/elmo.el | 5 +++-- elmo/modb-standard.el | 11 +++++++---- 3 files changed, 18 insertions(+), 6 deletions(-) diff --git a/elmo/ChangeLog b/elmo/ChangeLog index abf50cb..ac81799 100644 --- a/elmo/ChangeLog +++ b/elmo/ChangeLog @@ -1,3 +1,11 @@ +2005-04-01 Yuuichi Teranishi + + * elmo.el (elmo-folder-synchronize): Clear msgdb even when an + error occured while updating flag table. + + * modb-standard.el (modb-standard-load-entity): Cause an error when + entity format is for 2.15.0 or later. + 2005-03-25 Yuuichi Teranishi * 2.14.0 is released. diff --git a/elmo/elmo.el b/elmo/elmo.el index a55fb99..d414845 100644 --- a/elmo/elmo.el +++ b/elmo/elmo.el @@ -1533,8 +1533,9 @@ If update process is interrupted, return nil.") (flag-table (elmo-flag-table-load (elmo-folder-msgdb-path folder))) (before-append t)) (when ignore-msgdb - (elmo-msgdb-flag-table (elmo-folder-msgdb folder) flag-table) - (elmo-folder-clear folder (not disable-killed))) + (unwind-protect + (elmo-msgdb-flag-table (elmo-folder-msgdb folder) flag-table) + (elmo-folder-clear folder (not disable-killed)))) (unless no-check (elmo-folder-check folder)) (condition-case nil (let ((killed-list (elmo-folder-killed-list-internal folder)) diff --git a/elmo/modb-standard.el b/elmo/modb-standard.el index 46e4b61..5cce5cb 100644 --- a/elmo/modb-standard.el +++ b/elmo/modb-standard.el @@ -196,11 +196,14 @@ When non-nil, redundunt message-id string are not saved." (defun modb-standard-load-entity (modb path &optional section) (let ((table (or (modb-standard-entity-map-internal modb) (elmo-make-hash (elmo-msgdb-length modb)))) + (entities (elmo-object-load + (expand-file-name + (modb-standard-entity-filename section) + path))) number msgid) - (dolist (entity (elmo-object-load - (expand-file-name - (modb-standard-entity-filename section) - path))) + (when (symbolp (car entities)) + (error "Unsupported msgdb structure detected. Please re-create msgdb")) + (dolist (entity entities) (setq number (elmo-msgdb-message-entity-number (elmo-message-entity-handler entity) entity) -- 1.7.10.4