From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: X-Spam-Status: No, score=-4.0 required=3.0 tests=ALL_TRUSTED,BAYES_00 shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id 4C58A1F5AE for ; Sat, 29 May 2021 01:31:16 +0000 (UTC) From: Eric Wong To: meta@public-inbox.org Subject: [PATCH] lei_to_mail: use abs_path for Maildir in mail_sync.sqlite3 Date: Sat, 29 May 2021 01:31:15 +0000 Message-Id: <20210529013115.85208-1-e@80x24.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: lei->rel2abs doesn't resolve symlinks, which could cause synchronization problems with export-kw or other commands. --- lib/PublicInbox/LeiToMail.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/PublicInbox/LeiToMail.pm b/lib/PublicInbox/LeiToMail.pm index a7382169..078f2551 100644 --- a/lib/PublicInbox/LeiToMail.pm +++ b/lib/PublicInbox/LeiToMail.pm @@ -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