]> Sergey Matveev's repositories - public-inbox.git/blobdiff - lib/PublicInbox/LeiMailSync.pm
lei: implicitly watch all Maildirs it knows about
[public-inbox.git] / lib / PublicInbox / LeiMailSync.pm
index 6dfa03be2feaf2063d3681626a869271423f36fa..80e1bb9ddfa4343c54fbf5e7ca3a5c7e05854492 100644 (file)
@@ -412,6 +412,16 @@ sub forget_folder {
        $dbh->do('DELETE FROM folders WHERE fid = ?', undef, $fid);
 }
 
+# only used for changing canonicalization errors
+sub rename_folder {
+       my ($self, $old, $new) = @_;
+       my $fid = delete($self->{fmap}->{$old}) //
+               fid_for($self, $old) // return;
+       $self->{dbh}->do(<<EOM, undef, $new, $fid);
+UPDATE folders SET loc = ? WHERE fid = ?
+EOM
+}
+
 sub imap_oidbin ($$$) {
        my ($self, $url, $uid) = @_; # $url MUST have UIDVALIDITY
        my $fid = $self->{fmap}->{$url} //= fid_for($self, $url) // return;