dovecot-1.1: dovecot -n/-a: Fixes to printing which filesystem i...
dovecot at dovecot.org
dovecot at dovecot.org
Wed Oct 29 20:35:03 EET 2008
details: http://hg.dovecot.org/dovecot-1.1/rev/55bafaeee53b
changeset: 7984:55bafaeee53b
user: Timo Sirainen <tss at iki.fi>
date: Wed Oct 29 20:34:59 2008 +0200
description:
dovecot -n/-a: Fixes to printing which filesystem is being used.
diffstat:
1 file changed, 8 insertions(+), 2 deletions(-)
src/master/sysinfo-get.c | 10 ++++++++--
diffs (28 lines):
diff -r 7fc293c53ba7 -r 55bafaeee53b src/master/sysinfo-get.c
--- a/src/master/sysinfo-get.c Wed Oct 29 20:28:12 2008 +0200
+++ b/src/master/sysinfo-get.c Wed Oct 29 20:34:59 2008 +0200
@@ -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
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;
More information about the dovecot-cvs
mailing list