[dovecot-cvs] dovecot/src/plugins/convert convert-storage.c, 1.5.2.8, 1.5.2.9

tss at dovecot.org tss at dovecot.org
Sat Apr 7 11:07:51 EEST 2007


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

Modified Files:
      Tag: branch_1_0
	convert-storage.c 
Log Message:
If directory for destination storage doesn't exist, create it.



Index: convert-storage.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/plugins/convert/convert-storage.c,v
retrieving revision 1.5.2.8
retrieving revision 1.5.2.9
diff -u -d -r1.5.2.8 -r1.5.2.9
--- convert-storage.c	7 Apr 2007 08:04:54 -0000	1.5.2.8
+++ convert-storage.c	7 Apr 2007 08:07:49 -0000	1.5.2.9
@@ -251,15 +251,16 @@
 {
 	struct mail_storage *source_storage, *dest_storage;
 	struct dotlock *dotlock;
-        enum mail_storage_flags flags;
+        enum mail_storage_flags src_flags, dest_flags;
         enum mail_storage_lock_method lock_method;
 	const char *path;
 	int ret;
 
-	mail_storage_parse_env(&flags, &lock_method);
-	flags |= MAIL_STORAGE_FLAG_NO_AUTOCREATE;
+	mail_storage_parse_env(&src_flags, &lock_method);
+	dest_flags = src_flags;
+	src_flags |= MAIL_STORAGE_FLAG_NO_AUTOCREATE;
 	source_storage = mail_storage_create_with_data(source_data, user,
-						       flags, lock_method);
+						       src_flags, lock_method);
 	if (source_storage == NULL) {
 		/* No need for conversion. */
 		return 0;
@@ -280,7 +281,7 @@
 	   reopen the source storage */
 	mail_storage_destroy(&source_storage);
 	source_storage = mail_storage_create_with_data(source_data, user,
-						       flags, lock_method);
+						       src_flags, lock_method);
 	if (source_storage == NULL) {
 		/* No need for conversion anymore. */
 		file_dotlock_delete(&dotlock);
@@ -288,7 +289,7 @@
 	}
 
 	dest_storage = mail_storage_create_with_data(dest_data, user,
-						     flags, lock_method);
+						     dest_flags, lock_method);
 	if (dest_storage == NULL) {
 		i_error("Mailbox conversion: Failed to create destination "
 			"storage with data: %s", dest_data);



More information about the dovecot-cvs mailing list