about summary refs log tree commit homepage
path: root/lib/PublicInbox/LeiQuery.pm
diff options
context:
space:
mode:
Diffstat (limited to 'lib/PublicInbox/LeiQuery.pm')
-rw-r--r--lib/PublicInbox/LeiQuery.pm4
1 files changed, 1 insertions, 3 deletions
diff --git a/lib/PublicInbox/LeiQuery.pm b/lib/PublicInbox/LeiQuery.pm
index 1999a534..0435a516 100644
--- a/lib/PublicInbox/LeiQuery.pm
+++ b/lib/PublicInbox/LeiQuery.pm
@@ -51,9 +51,7 @@ sub qstr_add { # PublicInbox::InputPipe::consume callback for --stdin
         my ($self) = @_; # $_[1] = $rbuf
         if (defined($_[1])) {
                 $_[1] eq '' and return eval {
-                        if (my $dfd = $self->{3}) {
-                                chdir($dfd) or return $self->fail("fchdir: $!");
-                        }
+                        $self->fchdir or return;
                         $self->{mset_opt}->{q_raw} = $self->{mset_opt}->{qstr};
                         $self->{lse}->query_approxidate($self->{lse}->git,
                                                 $self->{mset_opt}->{qstr});