[dovecot-cvs] dovecot/src/plugins/convert convert-plugin.c, 1.4, 1.5 convert-storage.c, 1.21, 1.22 convert-storage.h, 1.3, 1.4 convert-tool.c, 1.6, 1.7

tss at dovecot.org tss at dovecot.org
Tue Apr 10 17:37:24 EEST 2007


Update of /var/lib/cvs/dovecot/src/plugins/convert
In directory talvi:/tmp/cvs-serv16432/src/plugins/convert

Modified Files:
	convert-plugin.c convert-storage.c convert-storage.h 
	convert-tool.c 
Log Message:
Changed convert_skip_dotfiles to convert_skip_dotdirs.
convert_skip_broken_mailboxes=yes is enough to skip non-mbox dotfiles.



Index: convert-plugin.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/plugins/convert/convert-plugin.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- convert-plugin.c	10 Apr 2007 14:30:31 -0000	1.4
+++ convert-plugin.c	10 Apr 2007 14:37:19 -0000	1.5
@@ -30,7 +30,7 @@
 		i_fatal("convert plugin: HOME unset");
 
 	set.skip_broken_mailboxes = getenv("CONVERT_SKIP_BROKEN_MAILBOXES") != NULL;
-	set.skip_dotfiles = getenv("CONVERT_SKIP_DOTFILES") != NULL;
+	set.skip_dotdirs = getenv("CONVERT_SKIP_DOTDIRS") != NULL;
 
 	str = getenv("CONVERT_ALT_HIERARCHY_CHAR");
 	set.alt_hierarchy_char = *str != '\0' ? *str : '_';

Index: convert-storage.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/plugins/convert/convert-storage.c,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -d -r1.21 -r1.22
--- convert-storage.c	10 Apr 2007 14:30:31 -0000	1.21
+++ convert-storage.c	10 Apr 2007 14:37:19 -0000	1.22
@@ -138,12 +138,13 @@
 
 	if ((info->flags & MAILBOX_NONEXISTENT) != 0)
 		return 0;
-	if (*info->name == '.' && set->skip_dotfiles)
-		return 0;
 
 	name = strcasecmp(info->name, "INBOX") == 0 ? "INBOX" : info->name;
 	if ((info->flags & MAILBOX_NOSELECT) != 0) {
 		/* \NoSelect mailbox, so it's probably a "directory" */
+		if (*info->name == '.' && set->skip_dotdirs)
+			return 0;
+
 		dest_name = mailbox_name_convert(dest_storage, source_storage,
 						 set, name);
 		if (mail_storage_mailbox_create(dest_storage, dest_name,

Index: convert-storage.h
===================================================================
RCS file: /var/lib/cvs/dovecot/src/plugins/convert/convert-storage.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- convert-storage.h	10 Apr 2007 14:30:31 -0000	1.3
+++ convert-storage.h	10 Apr 2007 14:37:20 -0000	1.4
@@ -5,7 +5,7 @@
 	const char *user;
 	const char *home;
 	bool skip_broken_mailboxes;
-	bool skip_dotfiles;
+	bool skip_dotdirs;
 	char alt_hierarchy_char;
 };
 

Index: convert-tool.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/plugins/convert/convert-tool.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- convert-tool.c	10 Apr 2007 14:30:31 -0000	1.6
+++ convert-tool.c	10 Apr 2007 14:37:20 -0000	1.7
@@ -38,8 +38,8 @@
 	for (i = 5; i < argc; i++) {
 		if (strcmp(argv[i], "skip_broken_mailboxes") != 0)
 			set.skip_broken_mailboxes = TRUE;
-		else if (strcmp(argv[i], "skip_dotfiles") != 0)
-			set.skip_dotfiles = TRUE;
+		else if (strcmp(argv[i], "skip_dotdirs") != 0)
+			set.skip_dotdirs = TRUE;
 		else if (strncmp(argv[i], "alt_hierarchy_char=", 19) != 0)
 			set.alt_hierarchy_char = argv[i][19];
 	}



More information about the dovecot-cvs mailing list