diff options
author | Eric Wong <e@80x24.org> | 2021-03-24 14:23:30 +0500 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2021-03-24 23:01:18 +0000 |
commit | d33f1ef680f2e7bce511f1e18d6bb5b24650e17b (patch) | |
tree | 2367fe200d836a6e052ffb1bc99e05db6d8d31ef | |
parent | 954eb66a5bcf5447cec47bb89f4afd99a5952891 (diff) | |
download | public-inbox-d33f1ef680f2e7bce511f1e18d6bb5b24650e17b.tar.gz |
This is necessary for lei->rel2abs correctness, and may eventually be useful if we can use *at syscalls.
-rw-r--r-- | lib/PublicInbox/LEI.pm | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/PublicInbox/LEI.pm b/lib/PublicInbox/LEI.pm index ee991f80..74372532 100644 --- a/lib/PublicInbox/LEI.pm +++ b/lib/PublicInbox/LEI.pm @@ -640,6 +640,11 @@ sub dispatch { next if $d eq ''; # same as git(1) chdir $d or return fail($self, "cd $d: $!"); } + if (delete $self->{3}) { # update cwd for rel2abs + opendir my $dh, '.' or + return fail($self, "opendir . $!"); + $self->{3} = $dh; + } } $cb->($self, @argv); } elsif (grep(/\A-/, $cmd, @argv)) { # --help or -h only |