]> Sergey Matveev's repositories - public-inbox.git/blobdiff - lib/PublicInbox/Fetch.pm
clone+fetch: respect umask for all downloaded files
[public-inbox.git] / lib / PublicInbox / Fetch.pm
index 0d4badbf216f87ba50a5e1d7a8986ca2a3117468..5261cad198552883ce162ea0fa3b84e908939da1 100644 (file)
@@ -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;
 }