summaryrefslogtreecommitdiffstats
path: root/etc/inc/pkg-utils.inc
diff options
context:
space:
mode:
authorErmal <eri@pfsense.org>2011-09-01 19:53:18 +0000
committerErmal <eri@pfsense.org>2011-09-01 19:53:38 +0000
commit47397d8662d064947beb4dd317ed0f837d5a608a (patch)
treea77ef19edfe79753c9e9c729c9b31a599a1f26c8 /etc/inc/pkg-utils.inc
parent4fef0242768e8636794ccfd3b53527250d1cf50d (diff)
downloadpfsense-47397d8662d064947beb4dd317ed0f837d5a608a.zip
pfsense-47397d8662d064947beb4dd317ed0f837d5a608a.tar.gz
Unlink the failed downloaded file if present. Since it might contain harmful and not expected content
Diffstat (limited to 'etc/inc/pkg-utils.inc')
-rw-r--r--etc/inc/pkg-utils.inc1
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;
}
OpenPOWER on IntegriCloud