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-07-13 18:20:20 +0300 |
commit | b6d3c300c1000142bc250b5d120a306a08dbfbb7 (patch) | |
tree | 214745583410cf086f349c09ab73bb7c27bf4a8b | |
parent | 344b5cea72bb90e6f0b422e8b22c0d96a24311a2 (diff) |
If a file needs to be updated, we can throw away the local copy
This prevents wget from making an extra request to the server to check
if the file needs to be downloaded - we already know that we want to
download it because the size is different.
-rwxr-xr-x | apt-mirror | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -793,6 +793,10 @@ sub need_update return 1 unless ($size); return 0 if $size_on_server == $size; + + if ( get_variable("unlink") == 1 ) + unlink $filename; + } return 1; } |