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 D72061F9F3 for ; Fri, 15 Oct 2021 13:30:56 +0000 (UTC) From: Eric Wong To: meta@public-inbox.org Subject: [PATCH 1/3] lei forget-search: fix for symlink-ed paths Date: Fri, 15 Oct 2021 13:30:54 +0000 Message-Id: <20211015133056.6845-2-e@80x24.org> In-Reply-To: <20211015133056.6845-1-e@80x24.org> References: <20211015133056.6845-1-e@80x24.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: If lei up and edit-search work on something, so should forget-search. --- lib/PublicInbox/LeiForgetSearch.pm | 2 +- t/lei-q-save.t | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/PublicInbox/LeiForgetSearch.pm b/lib/PublicInbox/LeiForgetSearch.pm index b5fe5fb1..717fa5e9 100644 --- a/lib/PublicInbox/LeiForgetSearch.pm +++ b/lib/PublicInbox/LeiForgetSearch.pm @@ -12,7 +12,7 @@ use SelectSaver; sub lei_forget_search { my ($lei, $out) = @_; - my $d = PublicInbox::LeiSavedSearch::lss_dir_for($lei, \$out); + my $d = PublicInbox::LeiSavedSearch::lss_dir_for($lei, \$out, 1); if (-e $d) { my $save; my $opt = { safe => 1 }; diff --git a/t/lei-q-save.t b/t/lei-q-save.t index 5940018c..05d5d9f4 100644 --- a/t/lei-q-save.t +++ b/t/lei-q-save.t @@ -173,6 +173,7 @@ test_lei(sub { symlink($o, "$home/ln -s") or skip "symlinks not supported in $home?: $!", 1; lei_ok('up', "$home/ln -s"); + lei_ok('forget-search', "$home/ln -s"); }; my $v2 = "$home/v2"; # v2: as an output destination