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

This commit is contained in:
Pat Hartl 2023-03-23 19:16:52 -05:00
parent 84f6c8d58b
commit b3b4d0dad6

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()
{