- } elsif ($path_info =~ m!$INBOX_RE/$MID_RE/(?:T|T/|t)\z!o) {
- my ($inbox, $mid) = ($1, $2);
- r301($ctx, $inbox, $mid, 't/#u');
+ } elsif ($path_info =~ m!$INBOX_RE/$MID_RE/(T|t)\z!o) {
+ my ($inbox, $mid, $suffix) = ($1, $2, $3);
+ $suffix .= $suffix =~ /\A[tT]\z/ ? '/#u' : '/';
+ r301($ctx, $inbox, $mid, $suffix);