* src/folder.c
check if folder_item_get_msginfo in folder_item_remove_msg returned NULL * src/imap.c better clear the uid cache in the uid validity check function and delete cached messages
This commit is contained in:
parent
33d3c7312e
commit
78eaab4e11
4 changed files with 33 additions and 17 deletions
|
@ -1,3 +1,13 @@
|
|||
2002-07-31 [christoph] 0.8.1claws4
|
||||
|
||||
* src/folder.c
|
||||
check if folder_item_get_msginfo in
|
||||
folder_item_remove_msg returned NULL
|
||||
* src/imap.c
|
||||
better clear the uid cache in the
|
||||
uid validity check function and delete
|
||||
cached messages
|
||||
|
||||
2002-07-31 [paul] 0.8.1claws3
|
||||
|
||||
* man/sylpheed.1
|
||||
|
|
|
@ -8,7 +8,7 @@ MINOR_VERSION=8
|
|||
MICRO_VERSION=1
|
||||
INTERFACE_AGE=0
|
||||
BINARY_AGE=0
|
||||
EXTRA_VERSION=claws3
|
||||
EXTRA_VERSION=claws4
|
||||
VERSION=$MAJOR_VERSION.$MINOR_VERSION.$MICRO_VERSION$EXTRA_VERSION
|
||||
|
||||
dnl set $target
|
||||
|
|
14
src/folder.c
14
src/folder.c
|
@ -1675,13 +1675,15 @@ gint folder_item_remove_msg(FolderItem *item, gint num)
|
|||
ret = folder->remove_msg(folder, item, num);
|
||||
|
||||
msginfo = msgcache_get_msg(item->cache, num);
|
||||
if(MSG_IS_NEW(msginfo->flags))
|
||||
item->new--;
|
||||
if(MSG_IS_UNREAD(msginfo->flags))
|
||||
item->unread--;
|
||||
if(msginfo != NULL) {
|
||||
if(MSG_IS_NEW(msginfo->flags))
|
||||
item->new--;
|
||||
if(MSG_IS_UNREAD(msginfo->flags))
|
||||
item->unread--;
|
||||
procmsg_msginfo_free(msginfo);
|
||||
msgcache_remove_msg(item->cache, num);
|
||||
}
|
||||
item->total--;
|
||||
procmsg_msginfo_free(msginfo);
|
||||
msgcache_remove_msg(item->cache, num);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
|
24
src/imap.c
24
src/imap.c
|
@ -1664,7 +1664,7 @@ static void imap_delete_all_cached_messages(FolderItem *item)
|
|||
g_return_if_fail(item->folder != NULL);
|
||||
g_return_if_fail(item->folder->type == F_IMAP);
|
||||
|
||||
debug_print(_("Deleting all cached messages... "));
|
||||
debug_print(_("Deleting all cached messages...\n"));
|
||||
|
||||
dir = folder_item_get_path(item);
|
||||
remove_all_numbered_files(dir);
|
||||
|
@ -3119,14 +3119,6 @@ GSList *imap_get_num_list(Folder *folder, FolderItem *_item)
|
|||
if (ok != IMAP_SUCCESS)
|
||||
return NULL;
|
||||
|
||||
if(item->item.mtime != uid_validity) {
|
||||
item->lastuid = 0;
|
||||
g_slist_free(item->uid_list);
|
||||
item->uid_list = NULL;
|
||||
|
||||
item->item.mtime = uid_validity;
|
||||
}
|
||||
|
||||
argbuf = g_ptr_array_new();
|
||||
if(item->lastuid) {
|
||||
cmdbuf = g_strdup_printf("UID FETCH %d:* (UID)", (item->lastuid + 1));
|
||||
|
@ -3256,5 +3248,17 @@ gboolean imap_check_msgnum_validity(Folder *folder, FolderItem *_item)
|
|||
if (ok != IMAP_SUCCESS)
|
||||
return FALSE;
|
||||
|
||||
return item->item.mtime == uid_validity;
|
||||
if(item->item.mtime == uid_validity)
|
||||
return TRUE;
|
||||
|
||||
debug_print("Freeing imap uid cache");
|
||||
item->lastuid = 0;
|
||||
g_slist_free(item->uid_list);
|
||||
item->uid_list = NULL;
|
||||
|
||||
item->item.mtime = uid_validity;
|
||||
|
||||
imap_delete_all_cached_messages((FolderItem *)item);
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue