From 840d72a2c8761cf0dda8ed0ca095bac67fc8a785 Mon Sep 17 00:00:00 2001 From: Timo Sirainen Date: Wed, 29 Oct 2008 20:35:17 +0200 Subject: [PATCH] dovecot -n/-a: Fixes to printing which filesystem is being used. --HG-- branch : HEAD --- src/master/sysinfo-get.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/master/sysinfo-get.c b/src/master/sysinfo-get.c index 826c9319c2..57b3c770b9 100644 --- a/src/master/sysinfo-get.c +++ b/src/master/sysinfo-get.c @@ -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 //%u style location */ if (mountpoint_get(path, pool_datastack_create(), &mp) < 0) return ""; return mp.type == NULL ? "" : mp.type; -- 2.47.3