diff options
author | Eric Wong <e@80x24.org> | 2021-10-14 04:32:53 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2021-10-14 09:07:15 +0000 |
commit | 896c59c925e61caf5d985e8531a35825eeecc99d (patch) | |
tree | 1a8605ed0c3e3822104e5f6e34136f37c16df67e /lib/PublicInbox/Fetch.pm | |
parent | c8b441f4ddcb9f6cbbe54cd380fe89586d023124 (diff) | |
download | public-inbox-896c59c925e61caf5d985e8531a35825eeecc99d.tar.gz |
Since public inboxes are usually intended to be public, the File::Temp default permission of 0600 is wrong. Just respect the user's umask in this case as git-clone does. This doesn't work for "lei add-external --mirror", yet; but it will...
Diffstat (limited to 'lib/PublicInbox/Fetch.pm')
-rw-r--r-- | lib/PublicInbox/Fetch.pm | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/PublicInbox/Fetch.pm b/lib/PublicInbox/Fetch.pm index 0d4badbf..5261cad1 100644 --- a/lib/PublicInbox/Fetch.pm +++ b/lib/PublicInbox/Fetch.pm @@ -218,13 +218,12 @@ EOM } for my $i (@new_epoch) { $mg->epoch_cfg_set($i) } if ($ft) { - my $fn = $ft->filename; if ($mculled) { my $json = PublicInbox::Config->json->encode($m1); + my $fn = $ft->filename; gzip(\$json => $fn) or die "gzip: $GzipError"; } - rename($fn, $mf) or die "E: rename($fn, $mf): $!\n"; - $ft->unlink_on_destroy(0); + PublicInbox::LeiMirror::ft_rename($ft, $mf, 0666); } $lei->child_error($xit << 8) if $fp2 && $xit; } |