diff options
author | Jeffrey Stedfast <fejj@ximian.com> | 2004-03-13 05:28:41 +0800 |
---|---|---|
committer | Jeffrey Stedfast <fejj@src.gnome.org> | 2004-03-13 05:28:41 +0800 |
commit | e28d5364ac2716e911c121657a20923682c5b2b2 (patch) | |
tree | 3a19fe2fc718a493d67b11498d2668094671b7f3 /camel/providers/local/camel-local-folder.c | |
parent | 3f727f063b1e13a89588f9cd1e5cf45a89c391e1 (diff) | |
download | gsoc2013-evolution-e28d5364ac2716e911c121657a20923682c5b2b2.tar gsoc2013-evolution-e28d5364ac2716e911c121657a20923682c5b2b2.tar.gz gsoc2013-evolution-e28d5364ac2716e911c121657a20923682c5b2b2.tar.bz2 gsoc2013-evolution-e28d5364ac2716e911c121657a20923682c5b2b2.tar.lz gsoc2013-evolution-e28d5364ac2716e911c121657a20923682c5b2b2.tar.xz gsoc2013-evolution-e28d5364ac2716e911c121657a20923682c5b2b2.tar.zst gsoc2013-evolution-e28d5364ac2716e911c121657a20923682c5b2b2.zip |
Fixes for bug #55018.
2004-03-12 Jeffrey Stedfast <fejj@ximian.com>
Fixes for bug #55018.
* providers/local/camel-local-folder.c
(camel_local_folder_construct): Use camel_url_to_string() here
too, so we properly encode the fragment.
* providers/local/camel-mbox-store.c (get_folder_info): Use
CamelURL to properly encode the fi->uri. Pass the CamelURL into
scan_dir() so that scan_dir() can re-use it (rather than having to
malloc/parse/free for each file/dir)
(scan_dir): Use camel_url_to_string().
* providers/local/camel-maildir-store.c (get_folder_info): Same as
mbox.
(scan_dir): Same as mbox. We also need to set the
CAMEL_FOLDER_NOSELECT flag if appropriate.
* providers/local/camel-mh-store.c (get_folder_info): Same as mbox
and maildir.
(folders_scan): Now takes a url argument which we pass off to
folder_info_new().
(recursive_scan): Same.
(folder_info_new): Use camel_url_to_string().
svn path=/trunk/; revision=25050
Diffstat (limited to 'camel/providers/local/camel-local-folder.c')
-rw-r--r-- | camel/providers/local/camel-local-folder.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/camel/providers/local/camel-local-folder.c b/camel/providers/local/camel-local-folder.c index 5ea484ef99..b61414074e 100644 --- a/camel/providers/local/camel-local-folder.c +++ b/camel/providers/local/camel-local-folder.c @@ -215,7 +215,8 @@ camel_local_folder_construct(CamelLocalFolder *lf, CamelStore *parent_store, con char folder_path[PATH_MAX]; struct stat st; int forceindex, len; - + CamelURL *url; + folder = (CamelFolder *)lf; name = strrchr(full_name, '/'); @@ -309,14 +310,19 @@ camel_local_folder_construct(CamelLocalFolder *lf, CamelStore *parent_store, con camel_object_unref (CAMEL_OBJECT (folder)); return NULL; } - + + url = camel_url_copy (((CamelService *) parent_store)->url); + camel_url_set_fragment (url, full_name); + fi = g_new0 (CamelFolderInfo, 1); fi->full_name = g_strdup (full_name); fi->name = g_strdup (name); - fi->uri = g_strdup_printf("%s:%s#%s", ((CamelService *)parent_store)->url->protocol, ((CamelService *)parent_store)->url->path, full_name); + fi->uri = camel_url_to_string (url, 0); fi->unread = camel_folder_get_unread_message_count(folder); camel_folder_info_build_path(fi, '/'); - + + camel_url_free (url); + camel_object_trigger_event(CAMEL_OBJECT (parent_store), "folder_created", fi); camel_folder_info_free(fi); |