Attempt extraction multiple times in case tmp file is still in use

pull/19/head
Pat Hartl 2023-03-23 19:16:52 -05:00
parent 84f6c8d58b
commit b3b4d0dad6
1 changed files with 7 additions and 1 deletions

View File

@ -55,7 +55,13 @@ namespace LANCommander.PlaynitePlugin
Plugin.DownloadCache[gameId] = tempDownloadLocation;
}
var installDirectory = Extract(game, tempDownloadLocation);
var installDirectory = RetryHelper.RetryOnException(10, TimeSpan.FromMilliseconds(500), "", () =>
{
return Extract(game, tempDownloadLocation);
});
if (installDirectory == "")
throw new Exception("Could not extract the install archive. Retry the install or check your connection.");
var installInfo = new GameInstallationData()
{