summaryrefslogtreecommitdiffstats
path: root/usr
diff options
context:
space:
mode:
authorRenato Botelho <renato.botelho@bluepex.com>2009-07-30 10:45:34 -0300
committerRenato Botelho <renato.botelho@bluepex.com>2009-07-30 10:45:34 -0300
commit7dde365ca4781ec6651345f4681bef449eeeddbc (patch)
treeaec7b9f4af2cb174576e213de6e434771fea63f7 /usr
parentc9f8d4f56cdfeeba33fe9388d408c45d42d85ba0 (diff)
downloadpfsense-7dde365ca4781ec6651345f4681bef449eeeddbc.zip
pfsense-7dde365ca4781ec6651345f4681bef449eeeddbc.tar.gz
Check if file exists before unlink
Diffstat (limited to 'usr')
-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