Skip to content

Commit

Permalink
fix the error of repairing game
Browse files Browse the repository at this point in the history
  • Loading branch information
Scighost committed Oct 18, 2023
1 parent a4912be commit 9d12d90
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/Starward/Services/DownloadGameService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -896,18 +896,25 @@ public async Task DownloadSeparateFilesAsync(CancellationToken cancellationToken
}
}).ConfigureAwait(false);

bool failed = false;
foreach (var item in sliceTasks)
{
var file = Path.Combine(installPath, item.FileName);
if (!File.Exists(file))
{
continue;
failed = true;
break;
}
if (new FileInfo(file).Length != item.Size)
{
continue;
failed = true;
break;
}
}
if (failed)
{
continue;
}
break;
}

Expand Down

0 comments on commit 9d12d90

Please sign in to comment.