summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xusr/local/www/system_firmware_auto.php6
1 files changed, 4 insertions, 2 deletions
diff --git a/usr/local/www/system_firmware_auto.php b/usr/local/www/system_firmware_auto.php
index b4ad6e9..25bad20 100755
--- a/usr/local/www/system_firmware_auto.php
+++ b/usr/local/www/system_firmware_auto.php
@@ -158,7 +158,8 @@ else if (($sigchk == 3) || ($sigchk == 4))
if (!verify_gzip_file("/tmp/latest.tgz")) {
update_status("The image file is corrupt.");
update_output_window("Update cannot continue");
- unlink("{$g['upload_path']}/latest.tgz");
+ if (file_exists("{$g['upload_path']}/latest.tgz"))
+ unlink("{$g['upload_path']}/latest.tgz");
require("fend.inc");
exit;
}
@@ -166,7 +167,8 @@ if (!verify_gzip_file("/tmp/latest.tgz")) {
if ($sigchk) {
update_status($sig_warning);
update_output_window("Update cannot continue");
- unlink("{$g['upload_path']}/latest.tgz");
+ if (file_exists("{$g['upload_path']}/latest.tgz"))
+ unlink("{$g['upload_path']}/latest.tgz");
require("fend.inc");
exit;
}
OpenPOWER on IntegriCloud