]> Sergey Matveev's repositories - public-inbox.git/commitdiff
searchidx: use cached local $@ copy
authorEric Wong <e@80x24.org>
Tue, 9 May 2017 06:30:41 +0000 (06:30 +0000)
committerEric Wong <e@80x24.org>
Tue, 9 May 2017 20:25:20 +0000 (20:25 +0000)
umask should never fail and set $@, but use the cached local
to be more explicit just in case.

lib/PublicInbox/SearchIdx.pm

index e4e3c81b82f60a7c8d4392d8f0f7917dc6634d45..fd0d320e8685fe34c37b5f07162d3e81da2f0c06 100644 (file)
@@ -620,7 +620,7 @@ sub with_umask {
        my $rv = eval { $cb->() };
        my $err = $@;
        umask $old;
-       die $err if $@;
+       die $err if $err;
        $rv;
 }