- if (!(mp = folder_read (folder)))
- adios (NULL, "unable to read folder %s", folder);
+ if (!(mp = folder_read(folder))) {
+ adios(NULL, "unable to read folder %s", folder);
+ }
+ if (mp->nummsg == 0) {
+ adios(NULL, "no messages in %s", folder);
+ }
+ /*
+ ** parse all the message ranges/sequences and set SELECTED
+ ** (We do this for the refiling case as well, to complain
+ ** about invalid msg arguments in rmm, before we call refile.)
+ */
+ for (msgnum = 0; msgnum < msgs.size; msgnum++) {
+ if (!m_convert(mp, msgs.msgs[msgnum])) {
+ done(1);
+ }
+ }