diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2004-12-26 23:52:07 +0000 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2004-12-26 23:52:07 +0000 |
commit | 67965af4110666fc798c19c610b6946cba3cb173 (patch) | |
tree | 22dcee2791214f766013d1a9060d782e2c86c4de /usr/local/www/system_firmware.php | |
parent | fbefdb87f256cafaf90930b47aadb2dd92432150 (diff) | |
download | pfsense-67965af4110666fc798c19c610b6946cba3cb173.zip pfsense-67965af4110666fc798c19c610b6946cba3cb173.tar.gz |
Only unlink if file exists.
Diffstat (limited to 'usr/local/www/system_firmware.php')
-rwxr-xr-x | usr/local/www/system_firmware.php | 6 |
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") { |