dovecot-2.2: lib-fs: Fixed fs-posix to work with fs_iter_init(pa...

dovecot at dovecot.org dovecot at dovecot.org
Tue Apr 21 18:01:32 UTC 2015


details:   http://hg.dovecot.org/dovecot-2.2/rev/5b8959b2ff5e
changeset: 18443:5b8959b2ff5e
user:      Timo Sirainen <tss at iki.fi>
date:      Tue Apr 21 20:59:48 2015 +0300
description:
lib-fs: Fixed fs-posix to work with fs_iter_init(path="") when fs prefix wasn't set.

diffstat:

 src/lib-fs/fs-posix.c |  4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diffs (14 lines):

diff -r 9aaacd260a7d -r 5b8959b2ff5e src/lib-fs/fs-posix.c
--- a/src/lib-fs/fs-posix.c	Tue Apr 21 20:16:36 2015 +0300
+++ b/src/lib-fs/fs-posix.c	Tue Apr 21 20:59:48 2015 +0300
@@ -707,6 +707,10 @@
 	iter->iter.flags = flags;
 	iter->path = fs->path_prefix == NULL ? i_strdup(path) :
 		i_strconcat(fs->path_prefix, path, NULL);
+	if (iter->path[0] == '\0') {
+		i_free(iter->path);
+		iter->path = i_strdup(".");
+	}
 	iter->dir = opendir(iter->path);
 	if (iter->dir == NULL && errno != ENOENT) {
 		iter->err = errno;


More information about the dovecot-cvs mailing list