From 56a22540bdff919cdae86775396b905e2f28f6a9 Mon Sep 17 00:00:00 2001 From: Timo Sirainen Date: Fri, 1 Nov 2013 16:43:53 +0200 Subject: [PATCH] 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. --- src/lib-storage/mail-storage-hooks.c | 6 ++++++ 1 file changed, 6 insertions(+) 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; -- 2.47.3