Skip to content

Commit c221342

Browse files
authored
[GOG]: avoid removing folder_name between library refresh (#2814)
1 parent 293762b commit c221342

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

src/backend/storeManagers/gog/games.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -328,7 +328,7 @@ export async function install(
328328
? await getLinuxInstallerInfo(appName)
329329
: null
330330

331-
if (gameInfo.folder_name === undefined) {
331+
if (gameInfo.folder_name === undefined || gameInfo.folder_name.length === 0) {
332332
logError('game info folder is undefined in GOG install', LogPrefix.Gog)
333333
return { status: 'error' }
334334
}

src/backend/storeManagers/gog/library.ts

+4
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,10 @@ export async function refresh(): Promise<ExecResult> {
194194
}
195195
const unifiedObject = await gogToUnifiedInfo(data, product?.data)
196196
if (unifiedObject.app_name) {
197+
const oldData = library.get(unifiedObject.app_name)
198+
if (oldData) {
199+
unifiedObject.folder_name = oldData.folder_name
200+
}
197201
gamesObjects.push(unifiedObject)
198202
}
199203
const installedInfo = installedGames.get(String(game.external_id))

0 commit comments

Comments
 (0)