]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
dovecot -n/-a: Fixes to printing which filesystem is being used.
authorTimo Sirainen <tss@iki.fi>
Wed, 29 Oct 2008 18:35:17 +0000 (20:35 +0200)
committerTimo Sirainen <tss@iki.fi>
Wed, 29 Oct 2008 18:35:17 +0000 (20:35 +0200)
--HG--
branch : HEAD

src/master/sysinfo-get.c

index 826c9319c2a3dc53a05c795104b373c39d374501..57b3c770b940d215b50d9dad24f59d990efb3b6d 100644 (file)
@@ -1,7 +1,6 @@
 /* Copyright (c) 2008 Dovecot authors, see the included COPYING file */
 
 #include "lib.h"
-#include "home-expand.h"
 #include "mountpoint.h"
 #include "strescape.h"
 #include "sysinfo-get.h"
@@ -91,8 +90,15 @@ static const char *filesystem_get(const char *mail_location)
                path = mail_location;
        else
                path = t_strcut(path + 1, ':');
-       path = home_expand(path);
+       if (*path == '~') {
+               /* we don't know where users' home dirs are */
+               return "";
+       }
+       path = t_strcut(path, '%');
+       if (strlen(path) <= 1)
+               return "";
 
+       /* all in all it seems we can support only /<path>/%u style location */
        if (mountpoint_get(path, pool_datastack_create(), &mp) < 0)
                return "";
        return mp.type == NULL ? "" : mp.type;