]> Sergey Matveev's repositories - public-inbox.git/blobdiff - lib/PublicInbox/LeiQuery.pm
lei: restore working directory in more places
[public-inbox.git] / lib / PublicInbox / LeiQuery.pm
index 1999a5344885f22799b666459579d04d88aa9831..0435a5163137a4f0693bf7374bf544041aa0ace0 100644 (file)
@@ -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});