From 78b66af8ce96ab41e476d3ebf36cd85fced6d781 Mon Sep 17 00:00:00 2001 From: 8 Date: Sun, 28 Oct 2001 05:10:56 +0000 Subject: Use path not protocol as the path part of the uri of the folder_created 2001-10-28 * providers/local/camel-local-folder.c (camel_local_folder_construct): Use path not protocol as the path part of the uri of the folder_created event. * providers/local/camel-maildir-store.c (scan_dir): If FAST is set, dont try and scan for unread counts. * providers/local/camel-local-store.c (create_folder): Implement, just return the folderinfo of the folder matched, not all of it. * camel-store.c (camel_store_rename_folder): Rename the camelfolders before emitting the folderchanged event (otherwise vstore fails to pick up change. * camel-store.c (camel_store_init): Always use a default dir_sep of '/'. * camel-store.h (struct _CamelStore): Added a dir_sep to the base store so rename and whatnot can work, temporary fix for mixed dir separator in folder name api's. * providers/imap/camel-map-store.c: (imap_connect_online): Also set the store's dir_sep here. (imap_connect_offline): " svn path=/trunk/; revision=14275 --- camel/providers/local/camel-maildir-store.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'camel/providers/local/camel-maildir-store.c') diff --git a/camel/providers/local/camel-maildir-store.c b/camel/providers/local/camel-maildir-store.c index 4d754e5f12..e26ab6b23e 100644 --- a/camel/providers/local/camel-maildir-store.c +++ b/camel/providers/local/camel-maildir-store.c @@ -271,18 +271,19 @@ static int scan_dir(CamelStore *store, GHashTable *visited, char *root, const ch base = path; /* if we have this folder open, get the real unread count */ + unread = -1; + CAMEL_STORE_LOCK(store, cache_lock); folder = g_hash_table_lookup(store->folders, path); if (folder) unread = camel_folder_get_unread_message_count(folder); - else - unread = 0; CAMEL_STORE_UNLOCK(store, cache_lock); /* if we dont have a folder, then scan the directory and get the unread count from there, which is reasonably cheap (on decent filesystem) */ /* Well we could get this from the summary, but this is more accurate */ - if (folder == NULL) { + if (folder == NULL + && (flags & CAMEL_STORE_FOLDER_INFO_FAST) == 0) { unread = 0; dir = opendir(new); if (dir) { -- cgit v1.2.3