diff --git a/src/backend/storeManagers/hyperplay/games.ts b/src/backend/storeManagers/hyperplay/games.ts index a6ef7ec07..4e9bd761b 100644 --- a/src/backend/storeManagers/hyperplay/games.ts +++ b/src/backend/storeManagers/hyperplay/games.ts @@ -1667,8 +1667,8 @@ async function checkIfPatchingIsFaster( const { compareManifests } = await import('@hyperplay/patcher') const { estimatedPatchSizeInKB } = compareManifests( - oldManifestJson, - newManifestJson + oldManifestJson.files, + newManifestJson.files ) // calc break point % where patching is faster @@ -1984,7 +1984,12 @@ async function applyPatching( newVersion } }) - rmSync(datastoreDir, { recursive: true }) + + // errors can be thrown before datastore dir created. rmSync on nonexistent dir blocks indefinitely + if (existsSync(datastoreDir)) { + rmSync(datastoreDir, { recursive: true }) + } + return { status: 'error', error: `Error while patching ${error}` } } }