diff -r -u3 imap-4.5_orig/src/c-client/mail.c imap-4.5/src/c-client/mail.c --- imap-4.5_orig/src/c-client/mail.c Wed Jan 27 17:35:56 1999 +++ imap-4.5/src/c-client/mail.c Thu Jun 17 10:48:16 1999 @@ -519,16 +519,22 @@ { int remote = ((*pat == '{') || (ref && *ref == '{')); DRIVER *d = maildrivers; + DRIVER *inbox_driver; + int only_maildir; if (*pat == '{') ref = NIL; /* ignore reference if pattern is remote */ if (stream && stream->dtb) { /* if have a stream, do it for that stream */ if (!(((d = stream->dtb)->flags & DR_LOCAL) && remote)) (*d->list) (stream,ref,pat); } /* otherwise do for all DTB's */ - else do if (!((d->flags & DR_DISABLE) || - ((d->flags & DR_LOCAL) && remote))) - (d->list) (NIL,ref,pat); - while (d = d->next); /* until at the end */ + else { + only_maildir = ((inbox_driver = mail_valid (NIL,"INBOX",NIL)) && + !strcmp(inbox_driver->name,"maildir")); + do if (!((d->flags & DR_DISABLE) || + ((d->flags & DR_LOCAL) && remote) || (only_maildir && strcmp(d->name,"maildir")) )) + (d->list) (NIL,ref,pat); + while (d = d->next); /* until at the end */ + } }