From: Timo Sirainen Date: Fri, 1 Nov 2013 14:43:53 +0000 (+0200) Subject: lib-storage: Hooks weren't called exactly in the order they were intended. X-Git-Tag: 2.2.7~29 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=56a22540bdff919cdae86775396b905e2f28f6a9;p=thirdparty%2Fdovecot%2Fcore.git lib-storage: Hooks weren't called exactly in the order they were intended. The comparison didn't skip the paths, so the "lib" prefix skipping didn't work. --- diff --git a/src/lib-storage/mail-storage-hooks.c b/src/lib-storage/mail-storage-hooks.c index c553ca4132..7e642b5b63 100644 --- a/src/lib-storage/mail-storage-hooks.c +++ b/src/lib-storage/mail-storage-hooks.c @@ -121,6 +121,12 @@ mail_storage_module_hooks_cmp(const struct mail_storage_module_hooks *h1, const struct mail_storage_module_hooks *h2) { const char *s1 = h1->module->path, *s2 = h2->module->path; + const char *p; + + p = strrchr(s1, '/'); + if (p != NULL) s1 = p+1; + p = strrchr(s2, '/'); + if (p != NULL) s2 = p+1; if (strncmp(s1, "lib", 3) == 0) s1 += 3;