]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
"Maildir filename has wrong W value" error was missing new/cur directory in the middle.
authorTimo Sirainen <tss@iki.fi>
Thu, 12 Feb 2009 23:36:45 +0000 (18:36 -0500)
committerTimo Sirainen <tss@iki.fi>
Thu, 12 Feb 2009 23:36:45 +0000 (18:36 -0500)
--HG--
branch : HEAD

src/lib-storage/index/maildir/maildir-mail.c

index cbd41c200f0a51deb9fdcdd65b45aee7e830c4cc..da1a260f38f424164d8ed3a48fbe8999b102bb22 100644 (file)
@@ -488,9 +488,12 @@ static void maildir_mail_set_cache_corrupted(struct mail *_mail,
                                               _mail->uid, &flags);
                if (maildir_filename_get_size(fname, MAILDIR_EXTRA_VIRTUAL_SIZE,
                                              &size)) {
+                       const char *subdir =
+                               (flags & MAILDIR_UIDLIST_REC_FLAG_NEW_DIR) != 0 ?
+                               "new" : "cur";
                        mail_storage_set_critical(_mail->box->storage,
-                               "Maildir filename has wrong W value: %s/%s",
-                               mbox->path, fname);
+                               "Maildir filename has wrong W value: %s/%s/%s",
+                               mbox->path, subdir, fname);
                } else if (maildir_uidlist_lookup_ext(mbox->uidlist, _mail->uid,
                                MAILDIR_UIDLIST_REC_EXT_VSIZE) != NULL) {
                        maildir_uidlist_set_ext(mbox->uidlist, _mail->uid,