From 4c90d054a1410e0cfd06771babc3dda76bcc2ab8 Mon Sep 17 00:00:00 2001 From: dmacias72 Date: Sun, 24 Apr 2016 23:19:51 -0600 Subject: [PATCH] remove bad downloads --- .../usr/local/emhttp/plugins/NerdPack/scripts/packagemanager | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/source/NerdPack/usr/local/emhttp/plugins/NerdPack/scripts/packagemanager b/source/NerdPack/usr/local/emhttp/plugins/NerdPack/scripts/packagemanager index 05c87e44..f17504c5 100755 --- a/source/NerdPack/usr/local/emhttp/plugins/NerdPack/scripts/packagemanager +++ b/source/NerdPack/usr/local/emhttp/plugins/NerdPack/scripts/packagemanager @@ -91,8 +91,11 @@ foreach ($pkg_cfg as $pkg_name => $pkg_pref) { // get preferences for each packa if (file_check_sha1($pkg_file, $pkg_sha1)) logger($pkg_gitname.' package downloaded sucessfully!', $argq); - else + else{ + if(is_file($pkg_file)) + unlink($pkg_file); logger($pkg_gitname.' package download failed!', $argq); + } } } if (!$pkg_install_status) {