summaryrefslogtreecommitdiffstats
path: root/usr
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2004-12-26 23:52:07 +0000
committerScott Ullrich <sullrich@pfsense.org>2004-12-26 23:52:07 +0000
commit67965af4110666fc798c19c610b6946cba3cb173 (patch)
tree22dcee2791214f766013d1a9060d782e2c86c4de /usr
parentfbefdb87f256cafaf90930b47aadb2dd92432150 (diff)
downloadpfsense-67965af4110666fc798c19c610b6946cba3cb173.zip
pfsense-67965af4110666fc798c19c610b6946cba3cb173.tar.gz
Only unlink if file exists.
Diffstat (limited to 'usr')
-rwxr-xr-xusr/local/www/system_firmware.php6
1 files changed, 4 insertions, 2 deletions
diff --git a/usr/local/www/system_firmware.php b/usr/local/www/system_firmware.php
index 9d750e8..d266422 100755
--- a/usr/local/www/system_firmware.php
+++ b/usr/local/www/system_firmware.php
@@ -80,8 +80,10 @@ if ($_POST && !file_exists($d_firmwarelock_path)) {
$mode = "disable";
else if (stristr($_POST['Submit'], "Upgrade") || $_POST['sig_override'])
$mode = "upgrade";
- else if ($_POST['sig_no'])
- unlink("{$g['ftmp_path']}/firmware.img");
+ else if ($_POST['sig_no']) {
+ if(file_exists("{$g['ftmp_path']}/firmware.img"))
+ unlink("{$g['ftmp_path']}/firmware.img");
+ }
if ($mode) {
if ($mode == "enable") {
OpenPOWER on IntegriCloud