dovecot-1.2: dovecot -n/-a: Fixes to printing which filesystem i...
dovecot at dovecot.org
dovecot at dovecot.org
Wed Oct 29 20:35:20 EET 2008
details: http://hg.dovecot.org/dovecot-1.2/rev/125e530609d4
changeset: 8356:125e530609d4
user: Timo Sirainen <tss at iki.fi>
date: Wed Oct 29 20:35:17 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 3a0101119ae3 -r 125e530609d4 src/master/sysinfo-get.c
--- a/src/master/sysinfo-get.c Wed Oct 29 20:28:30 2008 +0200
+++ b/src/master/sysinfo-get.c Wed Oct 29 20:35:17 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