Why mbpath (2.4.13) only honors metapath?

Pascal Gienger pascal.gienger at uni-konstanz.de
Thu Jan 12 04:10:05 EST 2012


Perhaps it was forgotten, but the "-m" flag is not honored and it always
shows the meta path.


Patch would be very easy so I am asking whether I have missed something...

bash-3.2# diff -u mbpath.c.orig mbpath.c
--- mbpath.c.orig       Fri Dec 30 22:19:18 2011
+++ mbpath.c    Thu Jan 12 10:06:01 2012
@@ -95,6 +95,7 @@
   int opt;             /* getopt() returns an int */
   char *alt_config = NULL;
   char buf[MAX_MAILBOX_PATH+1];
+  char *path;

   if ((geteuid()) == 0 && (become_cyrus() != 0)) {
       fatal("must run as the Cyrus user", EC_USAGE);
@@ -137,7 +138,10 @@
       if (mbentry.mbtype & MBTYPE_REMOTE) {
        printf("%s\n", mbentry.partition);
       } else {
-       char *path = mboxname_metapath(mbentry.partition, mbentry.name,
0, 0);
+        if (metadata)
+         path = mboxname_metapath(mbentry.partition, mbentry.name, 0, 0);
+        else
+         path = mboxname_datapath(mbentry.partition, mbentry.name, 0);
        printf("%s\n", path);
       }
     } else {



-- 
Pascal Gienger     Jabber/XMPP/Mail: pascal.gienger at uni-konstanz.de
University of Konstanz, IT Services Department ("Rechenzentrum")
Building V, Room V404, Phone +49 7531 88 5048, Fax +49 7531 88 3739
G+: https://plus.google.com/114525323843315818983/


More information about the Info-cyrus mailing list