From 19067b1c6aac0da122cab2fddac68c8b844fab6b Mon Sep 17 00:00:00 2001 From: Flutterish Date: Tue, 22 Feb 2022 18:08:23 +0100 Subject: [PATCH] fix checking for outdated files this resolves #4 --- osu.Game.Rulesets.RurusettoAddon/RulesetDownloadManager.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/osu.Game.Rulesets.RurusettoAddon/RulesetDownloadManager.cs b/osu.Game.Rulesets.RurusettoAddon/RulesetDownloadManager.cs index 8cce3eb..ffb5db3 100644 --- a/osu.Game.Rulesets.RurusettoAddon/RulesetDownloadManager.cs +++ b/osu.Game.Rulesets.RurusettoAddon/RulesetDownloadManager.cs @@ -72,10 +72,10 @@ public void CheckAvailability ( APIRuleset ruleset ) { var info = new FileInfo( ruleset.LocalPath ); info.Refresh(); - if ( s.LatestUpdate.HasValue && info.CreationTimeUtc < s.LatestUpdate.Value ) { + if ( s.LatestUpdate.HasValue && info.LastWriteTimeUtc < s.LatestUpdate.Value ) { availability.Value |= Availability.Outdated; } - else if ( info.Length != s.FileSize ) { + else if ( s.FileSize != 0 && info.Length != s.FileSize ) { availability.Value |= Availability.Outdated; } }