diff options
author | OccamsReiza <SupaHiro@users.noreply.github.com> | 2022-11-08 18:31:05 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-08 18:31:05 +0300 |
commit | ba3dceed6aa80677437359cb7a37d45576836d38 (patch) | |
tree | ce21c2d547a27dc9516d80b46354f20c0fdab812 | |
parent | 207f8a51c0c7ae7f2fe0ad23242b6976950347df (diff) | |
parent | e7ae245a64f87ced9e33c8026ec6cdf80c4b0159 (diff) |
Resume mirroring after an interrupted state
-rwxr-xr-x | apt-mirror | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -256,6 +256,7 @@ sub download_urls if ( length( get_variable("proxy_user") ) ) { push( @args, "-e proxy_user=" . get_variable("proxy_user") ); } if ( length( get_variable("proxy_password") ) ) { push( @args, "-e proxy_password=" . get_variable("proxy_password") ); } } + push @args, "--no-if-modified-since"; print "Downloading " . scalar(@urls) . " $stage files using $nthreads threads...\n"; while ( scalar @urls ) @@ -784,6 +785,9 @@ sub need_update return 1 unless ($size); return 0 if $size_on_server == $size; + + # The file is corrupted, throw it away so we can download it again + unlink $filename; return 1; } |