}
/* Allocate the main structure for folder information */
- mp = (struct msgs *) mh_xmalloc ((size_t) sizeof(*mp));
-
+ NEW(mp);
clear_folder_flags (mp);
mp->foldpath = name;
mp->lowmsg = 0;
/*
* Read and initialize the sequence information.
*/
- seq_read (mp, lockflag);
+ if (seq_read (mp, lockflag) == NOTOK) {
+ char seqfile[PATH_MAX];
+
+ /* Failed to lock sequence file. */
+ snprintf (seqfile, sizeof(seqfile), "%s/%s", mp->foldpath, mh_seq);
+ advise (seqfile, "failed to lock");
+
+ return NULL;
+ }
return mp;
}