diff options
author | Georgi Georgiev <310867+chutzimir@users.noreply.github.com> | 2022-07-13 18:15:35 +0300 |
---|---|---|
committer | Georgi Georgiev <310867+chutzimir@users.noreply.github.com> | 2022-10-17 17:41:23 +0300 |
commit | e7ae245a64f87ced9e33c8026ec6cdf80c4b0159 (patch) | |
tree | ce21c2d547a27dc9516d80b46354f20c0fdab812 | |
parent | dde1257c2cebe628802d27e9471e288cd8dc12b5 (diff) |
If a file needs to be updated, we better throw it away
This saves wget from making an extra request to the server to check if
the file needs to be downloaded - we already checked that we want to
download it.
-rwxr-xr-x | apt-mirror | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -785,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; } |