]> Sergey Matveev's repositories - public-inbox.git/commitdiff
lei_to_mail: use abs_path for Maildir in mail_sync.sqlite3
authorEric Wong <e@80x24.org>
Sat, 29 May 2021 00:57:19 +0000 (00:57 +0000)
committerEric Wong <e@80x24.org>
Sat, 29 May 2021 07:13:03 +0000 (07:13 +0000)
lei->rel2abs doesn't resolve symlinks, which could cause
synchronization problems with export-kw or other commands.

lib/PublicInbox/LeiToMail.pm

index a7382169d4286dba3c05fcfb10a2162218de2ac0..078f2551cacff90287bf77c7e89c2efd6942512a 100644 (file)
@@ -289,7 +289,7 @@ sub _maildir_write_cb ($$) {
        my $dst = $lei->{ovv}->{dst};
        my $lse = $lei->{lse}; # may be undef
        my $sto = $lei->{opt}->{'mail-sync'} ? $lei->{sto} : undef;
-       my $out = $sto ? 'maildir:'.$lei->rel2abs($dst) : undef;
+       my $out = $sto ? 'maildir:'.$lei->abs_path($dst) : undef;
 
        # Favor cur/ and only write to new/ when augmenting.  This
        # saves MUAs from having to do a mass rename when the initial