diff options
author | Ermal <eri@pfsense.org> | 2011-09-01 19:53:18 +0000 |
---|---|---|
committer | Ermal <eri@pfsense.org> | 2011-09-01 19:53:38 +0000 |
commit | 47397d8662d064947beb4dd317ed0f837d5a608a (patch) | |
tree | a77ef19edfe79753c9e9c729c9b31a599a1f26c8 | |
parent | 4fef0242768e8636794ccfd3b53527250d1cf50d (diff) | |
download | pfsense-47397d8662d064947beb4dd317ed0f837d5a608a.zip pfsense-47397d8662d064947beb4dd317ed0f837d5a608a.tar.gz |
Unlink the failed downloaded file if present. Since it might contain harmful and not expected content
-rw-r--r-- | etc/inc/pkg-utils.inc | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/etc/inc/pkg-utils.inc b/etc/inc/pkg-utils.inc index dd37c83..6b3b6c4 100644 --- a/etc/inc/pkg-utils.inc +++ b/etc/inc/pkg-utils.inc @@ -721,6 +721,7 @@ function install_package_xml($pkg) { update_output_window($static_output); if (download_file_with_progress_bar($afn['item'][0], $prefix . $filename) !== true) { $static_output .= "failed.\n"; + @unlink($prefix . $filename); update_output_window($static_output); return false; } |