On Sep 19, 2008, at 10:26 AM, Timo Sirainen wrote:
On Sep 19, 2008, at 6:05 PM, John Lightsey wrote:
The problem is the file glob on line 344 in convert_subscriptions()
# read updates from the directory my %updates; foreach (<$keyword_dir/*>) {
This isn't going to pick up any files beginning with a dot, so most
of the update files in the courierimapkeywords directory are going
to be skipped.Any suggestions how to best fix it? My Perl knowledge isn't too good.
opendir/readdir/closedir... Personally I avoid file globs in Perl
whenever possible because of the tricks and limitations involved with
them. For instance, if the glob expands to more than GLOB_LIMIT files
what is going to happen? opendir/readdir/closedir has very
predictable behavior.
Actually since we're talking about that, scan_maildir() is very likely
to hit the glob limit. It should also be switched to readdir. The
maildir files update loop in convert_subscriptions() as well.