return 0;
}
+static int maildir_open_message(MESSAGE *msg, CONTEXT *ctx, int msgno)
+{
+ HEADER *cur = ctx->hdrs[msgno];
+ char path[_POSIX_PATH_MAX];
+
+ snprintf (path, sizeof (path), "%s/%s", ctx->path, cur->path);
+ if ((msg->fp = fopen(path, "r")) == NULL
+ && errno == ENOENT && ctx->magic == M_MAILDIR) {
+ msg->fp = maildir_open_find_message (ctx->path, cur->path);
+ }
+
+ if (msg->fp == NULL) {
+ mutt_perror (path);
+ return -1;
+ }
+ return 0;
+}
/*
* Commit a message to a maildir folder.
access,
maildir_read_dir,
maildir_open_new_message,
+ maildir_open_message,
NULL,
maildir_check_mailbox,
NULL,
access,
mh_read_dir,
mh_open_new_message,
+ maildir_open_message,
NULL,
mh_check_mailbox,
NULL,