Skip to content

Commit

Permalink
fix checking for outdated files
Browse files Browse the repository at this point in the history
this resolves #4
  • Loading branch information
Flutterish committed Feb 22, 2022
1 parent 7e7c35b commit 19067b1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions osu.Game.Rulesets.RurusettoAddon/RulesetDownloadManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
Expand Down

0 comments on commit 19067b1

Please sign in to comment.