[dovecot-cvs] dovecot/src/lib-storage/index/maildir maildir-storage.c, 1.115.2.7, 1.115.2.8
cras at dovecot.org
cras at dovecot.org
Thu Aug 10 23:36:08 EEST 2006
Update of /var/lib/cvs/dovecot/src/lib-storage/index/maildir
In directory talvi:/tmp/cvs-serv11648/lib-storage/index/maildir
Modified Files:
Tag: branch_1_0
maildir-storage.c
Log Message:
Create maildirfolder file when creating new maildirs.
Index: maildir-storage.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-storage/index/maildir/maildir-storage.c,v
retrieving revision 1.115.2.7
retrieving revision 1.115.2.8
diff -u -d -r1.115.2.7 -r1.115.2.8
--- maildir-storage.c 4 Jul 2006 17:03:27 -0000 1.115.2.7
+++ maildir-storage.c 10 Aug 2006 20:36:06 -0000 1.115.2.8
@@ -23,6 +23,8 @@
problems when they reach the limit. */
#define MAILDIR_MAX_MAILBOX_NAME_LENGTH (PATH_MAX/2)
+#define MAILDIR_SUBFOLDER_FILENAME "maildirfolder"
+
struct rename_context {
bool found;
size_t oldnamelen;
@@ -638,6 +640,7 @@
struct index_storage *storage = (struct index_storage *)_storage;
struct stat st;
const char *path, *shared_path;
+ int fd;
mail_storage_clear_error(_storage);
@@ -663,6 +666,15 @@
}
return -1;
}
+
+ /* Maildir++ spec want that maildirfolder named file is created for
+ all subfolders. */
+ path = t_strconcat(path, "/" MAILDIR_SUBFOLDER_FILENAME, NULL);
+ fd = open(path, O_CREAT | O_WRONLY, CREATE_MODE & 0666);
+ if (fd == -1)
+ i_error("open(%s, O_CREAT) failed: %m", path);
+ else
+ (void)close(fd);
return 0;
}
More information about the dovecot-cvs
mailing list