diff options
author | Ermal <eri@pfsense.org> | 2011-09-01 19:53:18 +0000 |
---|---|---|
committer | Ermal <eri@pfsense.org> | 2011-09-01 19:54:03 +0000 |
commit | 6f14b34a6043a2b63561bc8aaccacaf3f8e84472 (patch) | |
tree | 93a95504f3d304f07ae16f98c4d21caf6dc3952c /etc/inc | |
parent | 3adae4dbdbd655756257b4d8df3115c95557b89f (diff) | |
download | pfsense-6f14b34a6043a2b63561bc8aaccacaf3f8e84472.zip pfsense-6f14b34a6043a2b63561bc8aaccacaf3f8e84472.tar.gz |
Unlink the failed downloaded file if present. Since it might contain harmful and not expected content
Diffstat (limited to 'etc/inc')
-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 2903a32..86070c1 100644 --- a/etc/inc/pkg-utils.inc +++ b/etc/inc/pkg-utils.inc @@ -715,6 +715,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; } |