From bd2b98c9b0800522919a69bfff519c0934f2bb8e Mon Sep 17 00:00:00 2001 From: Ermal Date: Sat, 12 Feb 2011 18:34:32 +0000 Subject: Remove any previous file with the same name as the one that will be downloaded. This avoid the gui to always show update availble even though the site could not be reached. --- usr/local/www/system_firmware_auto.php | 1 + 1 file changed, 1 insertion(+) (limited to 'usr/local/www/system_firmware_auto.php') diff --git a/usr/local/www/system_firmware_auto.php b/usr/local/www/system_firmware_auto.php index 06a9eb1..2daa6a2 100755 --- a/usr/local/www/system_firmware_auto.php +++ b/usr/local/www/system_firmware_auto.php @@ -136,6 +136,7 @@ if ($g['platform'] == "nanobsd") { $nanosize .= strtolower(trim(file_get_contents("/etc/nanosize.txt"))); } +@unlink("/tmp/{$g['product_name']}_version"); download_file_with_progress_bar("{$updater_url}/version{$nanosize}", "/tmp/{$g['product_name']}_version"); $latest_version = str_replace("\n", "", @file_get_contents("/tmp/{$g['product_name']}_version")); if(!$latest_version) { -- cgit v1.1