From 076f1322ba8fd0386760fc68a9df9efd34afe4a6 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Tue, 14 Sep 2021 19:35:28 +0000 Subject: uri_imap: handle '/' as an IMAP hierarchy separator Untested at the moment(*), but we were inadvertantly truncating mailbox names with '/' due to our work-in-progress handling of "/;UID=$NUM" parameter. (*) strangely, my dovecot instance doesn't allow '/' by default, so the change to xt/net_writer-imap.t is untested. Reported-by: Konstantin Ryabitsev Link: https://public-inbox.org/meta/20210914175025.eq7s2shkc323itaf@meerkat.local/ --- lib/PublicInbox/URIimap.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/PublicInbox/URIimap.pm') diff --git a/lib/PublicInbox/URIimap.pm b/lib/PublicInbox/URIimap.pm index a309fde0..6907e32a 100644 --- a/lib/PublicInbox/URIimap.pm +++ b/lib/PublicInbox/URIimap.pm @@ -63,7 +63,7 @@ sub path { my ($self) = @_; my (undef, undef, $path) = uri_split($$self); $path =~ s!\A/+!!; - $path =~ s![/;].*\z!!; # [;UIDVALIDITY=nz-number]/;UID=nz-number + $path =~ s!/?;.*\z!!; # [;UIDVALIDITY=nz-number]/;UID=nz-number $path eq '' ? undef : $path; } -- cgit v1.2.3-24-ge0c7