dovecot-2.2: doveadm fs delete: When doing recursive deletion, d...

dovecot at dovecot.org dovecot at dovecot.org
Tue Jun 3 21:36:30 UTC 2014


details:   http://hg.dovecot.org/dovecot-2.2/rev/304d545927d2
changeset: 17436:304d545927d2
user:      Timo Sirainen <tss at iki.fi>
date:      Wed Jun 04 00:35:27 2014 +0300
description:
doveadm fs delete: When doing recursive deletion, delete also the directories if needed.

diffstat:

 src/doveadm/doveadm-fs.c |  6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diffs (16 lines):

diff -r 9b2900369a72 -r 304d545927d2 src/doveadm/doveadm-fs.c
--- a/src/doveadm/doveadm-fs.c	Tue Jun 03 23:52:39 2014 +0300
+++ b/src/doveadm/doveadm-fs.c	Wed Jun 04 00:35:27 2014 +0300
@@ -243,7 +243,11 @@
 
 	/* delete files. again because we're doing this asynchronously finish
 	   the iteration first. */
-	array_clear(&fnames);
+	if ((fs_get_properties(fs) & FS_PROPERTY_DIRECTORIES) != 0) {
+		/* we need to explicitly delete also the directories */
+	} else {
+		array_clear(&fnames);
+	}
 	iter = fs_iter_init(fs, path, 0);
 	while ((fname = fs_iter_next(iter)) != NULL) {
 		fname = t_strdup(fname);


More information about the dovecot-cvs mailing list