Take fixed version into account when checking for a new version

This commit is contained in:
Jamie Cameron
2016-11-14 20:34:34 -08:00
parent c8ef4468c3
commit 84de87f7ed

View File

@@ -931,13 +931,16 @@ return undef;
}
# update_last_check()
# If the last check time is too old, check for the latest version
# If the last check time is too old OR the version has changed, check for the
# latest version
sub update_last_check
{
if (time() - $config{'last_check'} > 6*60*60) {
if (time() - $config{'last_check'} > 6*60*60 ||
$config{'download_version'} ne $config{'last_version'}) {
my $sz = &check_server_download_size();
$config{'last_check'} = time();
$config{'last_size'} = $sz;
$config{'last_version'} = $config{'download_version'};
&save_module_config();
}
}