From 0b2cc6633c190b8433ea0c5ef818697ffdf51744 Mon Sep 17 00:00:00 2001 From: Dan Winship Date: Mon, 1 Oct 2001 18:09:53 +0000 Subject: Don't munge the URL; CamelSession's caching relies on it not changing. * providers/local/camel-local-store.c (construct): Don't munge the URL; CamelSession's caching relies on it not changing. Instead, add a toplevel_dir field to CamelLocalStore, and set that to the path, but always ending with /. (camel_local_store_finalize): Free toplevel_dir (camel_local_store_get_toplevel_dir): Return toplevel_dir rather than url->path. * providers/local/*: Lots of s/url->path/toplevel_dir/ * providers/local/camel-spool-store.c (construct): Likewise, don't try to strip a trailing / from url->path here, but I didn't make the corresponding toplevel_dir change, because there's no good reason someone should expect "/var/spool/mail/danw/" to work since that's not a directory. svn path=/trunk/; revision=13264 --- camel/providers/local/camel-mh-store.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'camel/providers/local/camel-mh-store.c') diff --git a/camel/providers/local/camel-mh-store.c b/camel/providers/local/camel-mh-store.c index 23515a8a61..8d3d66cbc3 100644 --- a/camel/providers/local/camel-mh-store.c +++ b/camel/providers/local/camel-mh-store.c @@ -82,7 +82,7 @@ static CamelFolder *get_folder(CamelStore * store, const char *folder_name, guin if (camel_exception_is_set(ex)) return NULL; - name = g_strdup_printf("%s%s", CAMEL_SERVICE(store)->url->path, folder_name); + name = g_strdup_printf("%s%s", CAMEL_LOCAL_STORE(store)->toplevel_dir, folder_name); if (stat(name, &st) == -1) { if (errno != ENOENT) { @@ -121,7 +121,7 @@ static void delete_folder(CamelStore * store, const char *folder_name, CamelExce char *name; /* remove folder directory - will fail if not empty */ - name = g_strdup_printf("%s%s", CAMEL_SERVICE(store)->url->path, folder_name); + name = g_strdup_printf("%s%s", CAMEL_LOCAL_STORE(store)->toplevel_dir, folder_name); if (rmdir(name) == -1) { camel_exception_setv(ex, CAMEL_EXCEPTION_SYSTEM, _("Could not delete folder `%s': %s"), -- cgit v1.2.3