From e326878d8466c12ebc6866105e5727825c69bf45 Mon Sep 17 00:00:00 2001 From: Brett <27568879+BrettCleary@users.noreply.github.com> Date: Wed, 21 Feb 2024 16:39:11 -0800 Subject: [PATCH] use download folder install path for .temp if available, config folder otherwise --- src/backend/storeManagers/hyperplay/games.ts | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/backend/storeManagers/hyperplay/games.ts b/src/backend/storeManagers/hyperplay/games.ts index 89a72d7c7..8b5f03362 100644 --- a/src/backend/storeManagers/hyperplay/games.ts +++ b/src/backend/storeManagers/hyperplay/games.ts @@ -30,7 +30,8 @@ import { isWindows, isLinux, configFolder, - getValidateLicenseKeysApiUrl + getValidateLicenseKeysApiUrl, + configStore } from 'backend/constants' import { downloadFile, @@ -559,7 +560,11 @@ function getZipFileName( platformInfo: PlatformConfig ): { directory: string; filename: string } { const zipName = encodeURI(platformInfo.name) - const tempfolder = path.join(configFolder, 'hyperplay', '.temp', appName) + const downloadFolder = configStore.get( + 'settings.defaultInstallPath', + configFolder + ) + const tempfolder = path.join(downloadFolder, 'hyperplay', '.temp', appName) if (!existsSync(tempfolder)) { mkdirSync(tempfolder, { recursive: true })