summaryrefslogtreecommitdiffstats
path: root/bcache.c
diff options
context:
space:
mode:
authorBrendan Cully <brendan@kublai.com>2007-04-10 16:22:08 -0700
committerBrendan Cully <brendan@kublai.com>2007-04-10 16:22:08 -0700
commitf7162dc5f4148fd39d62d73c18be3ebe72b889b4 (patch)
tree539a6a9d588981c086a91ceaa56a9031968307f0 /bcache.c
parent912cb25fff0c0b94f5ad2559aab6a4da2b1b714a (diff)
Simplify body cache path creation
Diffstat (limited to 'bcache.c')
-rw-r--r--bcache.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/bcache.c b/bcache.c
index 5b6d63ee..dbdc3467 100644
--- a/bcache.c
+++ b/bcache.c
@@ -57,7 +57,7 @@ static int bcache_path(ACCOUNT *account, const char *mailbox,
* if this ever changes, we have a memleak here
*/
url.path = NULL;
- if (url_ciss_tostring (&url, host, sizeof (host), 0) < 0)
+ if (url_ciss_tostring (&url, host, sizeof (host), U_PATH) < 0)
{
dprint (1, (debugfile, "bcache_path: URL to string failed\n"));
return -1;
@@ -65,13 +65,6 @@ static int bcache_path(ACCOUNT *account, const char *mailbox,
dprint (3, (debugfile, "bcache_path: URL: '%s'\n", host));
- /* transform URL scheme:// to scheme: */
- for (s = p = host; *s; s++)
- /* keep trailing slash */
- if (*s != '/' || *(s + 1) == '\0')
- *p++ = *s;
- *p = '\0';
-
len = snprintf (dst, dstlen-1, "%s/%s%s%s", MessageCachedir,
host, NONULL(mailbox),
(mailbox && *mailbox &&