diff options
author | Eric Wong <e@80x24.org> | 2021-09-16 20:56:39 -0500 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2021-09-17 04:41:03 +0000 |
commit | 1323196d1df67db5cb47a171a60236049c1e5ce5 (patch) | |
tree | e81ed65e5659a1e8d052a19acca8274f565b0a68 /lib/PublicInbox/LeiStore.pm | |
parent | 40e1f1612777251169fe9fb0d81bc5d062dd72c8 (diff) | |
download | public-inbox-1323196d1df67db5cb47a171a60236049c1e5ce5.tar.gz |
Merely pruning mail synchronization information was insufficient for Maildir: renames are common in Maildir and we need to detect them after-the-fact when lei-daemon isn't running. Running this command could make "lei index" far more useful... v2: close R/O mail_sync.sqlite3 dbh before fork Keeping the DB file handle open across fork can cause bad things to happen even if we don't use it since sqlite3 itself still knows about it (but doesn't know Perl code doesn't know about it).
Diffstat (limited to 'lib/PublicInbox/LeiStore.pm')
-rw-r--r-- | lib/PublicInbox/LeiStore.pm | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/PublicInbox/LeiStore.pm b/lib/PublicInbox/LeiStore.pm index e8bcb04e..32f55abd 100644 --- a/lib/PublicInbox/LeiStore.pm +++ b/lib/PublicInbox/LeiStore.pm @@ -293,6 +293,11 @@ sub set_sync_info { _lms_rw($self)->set_src(pack('H*', $oidhex), $folder, $id); } +sub lms_set_src { + my ($self, $oidbin, $folder, $id) = @_; + _lms_rw($self)->set_src($oidbin, $folder, $id); +} + sub _remove_if_local { # git->cat_async arg my ($bref, $oidhex, $type, $size, $self) = @_; $self->{im}->remove($bref) if $bref; |