Red Hat Bugzilla – Bug 6002
pine-4.10-maildir.patch behavior issues
Last modified: 2008-05-01 11:37:52 EDT
In the module /pine4.10/imap/src/osdep/unix/maildir.c,
This patch contains a module named maildir.c which
contains this function,
void maildir_list (MAILSTREAM *stream,char *ref, char *pat);
When "L FOLDER LIST" is selected from the main Pine
menu, maildir_list is called with these parameters,
maildir_list(0x0, "mail/", "%")
If you follow the code, it ends up doing a readdir()
of the directory *above* "mail/", and then does a
one-level deep recursive stat() of every file it finds.
(Try running "strace pine 2> pine.log" to see all
the files that get stat-ed.)
On my system and probably many others, this takes a
substantial amount of time.
I'm not sure what this code is supposed to be doing.
As it stands, "ref" is never even used. This may be
because it is called as an "abstract method" from
In any case, this is some weird behavior. Its a real
problem for me because it trips the automounter when
it hits symlinks to files on remote systems that are
not always running, bringing Pine to a halt until
the stat() call times out (a minute or longer).
I had a few minutes to put a patch together to fix this problem.
It fixes the errant directory searches, but I did not test it with
Pine's IMAP or NNTP features (I do not use those features).
The patch and instructions can be found at,