Date: | Thu, 19 May 2005 15:33:37 -0400 (EDT) |
From: | Mike Porter <mike [...] UDel.Edu> |
To: | bug-Mail-IMAPClient [...] rt.cpan.org |
Subject: | Bug in IMAPClient.pm |
When doing the tests with a real imap server:
0) Version Mail-IMAPClient-2.2.9.
1) Our server uses a '.' as the folder sep.
2) Line 3167 of IMAPClient.pm
return 1 if scalar(grep /^${folder}${sep}/, $self->folders);
${sep} is undefined. It is undefined because $self->separator($folder);
does not find the folder in the list array. Normally, when this
happens, the default '/' is returned via line 339:
my $list = (grep(/^\*\s+LIST\s+/,($self->list(undef,$target)||("NO")) ))[0] ||
qq("/");
As I mentioned, our sep is '.', not '/'.
Suggest:
[mike@taxi Mail-IMAPClient-2.2.9]$ gdiff -u IMAPClient.pm.old IMAPClient.pm
--- IMAPClient.pm.old 2005-05-19 15:28:25.956961000 -0400
+++ IMAPClient.pm 2005-05-19 15:29:32.840537000 -0400
@@ -3161,6 +3161,9 @@
return 0 if $f =~ /HasNoChildren/i ;
unless ( $f =~ /\\/) { # no flags at all unless there's a backslash
my $sep = $self->separator($folder);
+
+ $sep = $self->separator( undef ) if (!defined( $sep ));
+
return 1 if scalar(grep /^${folder}${sep}/, $self->folders);
return 0;
}
or something similar to pick up the "INBOX" sep. Also: somewhere in
the rfc, it states that a:
f list "" ""
* LIST (\Noselect) "." ""
provides the sep.
Mike
-
Mike Porter
PGP Fingerprint: F4 AE E1 9F 67 F7 DA EA 2F D2 37 F3 99 ED D1 C2