dovecot-2.2: fs-posix: Removed the FS_PROPERTY_DIRECTORIES after...

dovecot at dovecot.org dovecot at dovecot.org
Thu Feb 19 10:00:36 UTC 2015


details:   http://hg.dovecot.org/dovecot-2.2/rev/faed0c7403f8
changeset: 18264:faed0c7403f8
user:      Timo Sirainen <tss at iki.fi>
date:      Thu Feb 19 12:00:11 2015 +0200
description:
fs-posix: Removed the FS_PROPERTY_DIRECTORIES after all.
We could have kept it if we removed the auto-rmdir()-parents feature in
fs_delete(), but SIS code already somewhat relies on it so it's better not
to change it for now at least.

The downside here though is that directories are rmdir()ed only if
fs_settings.root_dir is set. So for example "doveadm fs delete -R" doesn't
ever rmdir() any directories. But that's probably not a real problem.

diffstat:

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

diffs (17 lines):

diff -r 86d382b0c4d8 -r faed0c7403f8 src/lib-fs/fs-posix.c
--- a/src/lib-fs/fs-posix.c	Thu Feb 19 10:24:09 2015 +0200
+++ b/src/lib-fs/fs-posix.c	Thu Feb 19 12:00:11 2015 +0200
@@ -132,9 +132,11 @@
 
 static enum fs_properties fs_posix_get_properties(struct fs *fs ATTR_UNUSED)
 {
+	/* FS_PROPERTY_DIRECTORIES not returned because fs_delete()
+	   automatically rmdir()s parents. This could be changed later though,
+	   but SIS code at least would need to be changed to support it. */
 	return FS_PROPERTY_LOCKS | FS_PROPERTY_FASTCOPY | FS_PROPERTY_RENAME |
-		FS_PROPERTY_STAT | FS_PROPERTY_ITER | FS_PROPERTY_RELIABLEITER |
-		FS_PROPERTY_DIRECTORIES;
+		FS_PROPERTY_STAT | FS_PROPERTY_ITER | FS_PROPERTY_RELIABLEITER;
 }
 
 static int fs_posix_mkdir_parents(struct posix_fs *fs, const char *path)


More information about the dovecot-cvs mailing list