diff src/lib-storage/index/maildir/maildir-sync.c @ 2256:93856e13e020 HEAD

Require that filenames in maildir begin with a digit, otherwise complain.
author Timo Sirainen <tss@iki.fi>
date Tue, 29 Jun 2004 18:56:34 +0300
parents 1057a5dc0ca7
children 087a43e29492
line wrap: on
line diff
--- a/src/lib-storage/index/maildir/maildir-sync.c	Tue Jun 29 16:18:21 2004 +0300
+++ b/src/lib-storage/index/maildir/maildir-sync.c	Tue Jun 29 18:56:34 2004 +0300
@@ -441,8 +441,13 @@
 	move_new = new_dir && !mailbox_is_readonly(&ctx->ibox->box) &&
 		!ctx->ibox->keep_recent;
 	while ((dp = readdir(dirp)) != NULL) {
-		if (dp->d_name[0] == '.')
+		if (dp->d_name[0] < '0' || dp->d_name[0] > '9') {
+			if (dp->d_name[0] != '.') {
+				i_warning("Invalid maildir filename in %s: %s",
+					  dir, dp->d_name);
+			}
 			continue;
+		}
 
 		ret = maildir_uidlist_sync_next_pre(ctx->uidlist_sync_ctx,
 						    dp->d_name);