[PATCH] hcache fixes for upstream
Hello TLR,
this is a fix for hcache.c infrastructure which is about wrongly
calculate unique id. Please apply.
Greetings,
Thomas
===== hcache.c 1.5 vs edited =====
--- 1.5/hcache.c 2005-02-01 07:13:28 +01:00
+++ edited/hcache.c 2005-02-03 20:12:18 +01:00
@@ -678,7 +678,7 @@
safe_strcat(path, sizeof (path), filename);
key.dptr = path;
- key.dsize = keylen(path);
+ key.dsize = strlen(h->folder) + keylen(path + strlen(h->folder));
data = gdbm_fetch(h->db, key);
@@ -709,7 +709,7 @@
safe_strcat(path, sizeof (path), filename);
key.dptr = path;
- key.dsize = keylen(path);
+ key.dsize = strlen(h->folder) + keylen(path + strlen(h->folder));
data.dptr = mutt_hcache_dump(db, header, &data.dsize, uid_validity);
@@ -735,7 +735,7 @@
safe_strcat(path, sizeof (path), filename);
key.dptr = path;
- key.dsize = keylen(path);
+ key.dsize = strlen(h->folder) + keylen(path + strlen(h->folder));
return gdbm_delete(h->db, key);
}