Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@beeradmoore
Copy link
Owner

Description of Changes

When loading games from cache or libraries, if the install path is not found we don't proceed to add the game to the games list.

When this is triggered loading from cache we also remove GameAsset objects. This is because if the disappearing game folder is from a temporary issue we don't reset the game data (notes, history, etc). This data will be rebuilt if/when the game reappears.

Type of Change

  • Bug fix
  • New feature
  • Documentation update

Issues Resolved

#537

@beeradmoore beeradmoore requested a review from Copilot May 25, 2025 04:01
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR prevents games with missing install paths from appearing in listings and cache loads, and cleans up their cached assets without deleting the game record.

  • Added Directory.Exists checks in ListGamesAsync across all platform libraries to skip games whose install paths are gone.
  • Introduced similar path validations in LoadGamesFromCacheAsync, logging the issue and calling RemoveGameAssetsFromCacheAsync instead of dropping the game.
  • Added the RemoveGameAssetsFromCacheAsync method in Game.cs to delete cached assets for a game.

Reviewed Changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
src/Data/Xbox/XboxLibrary.cs Added install-path guard in ListGamesAsync and cache load methods.
src/Data/UbisoftConnect/UbisoftConnectLibrary.cs Inserted path-existence checks before DB save and cache load.
src/Data/Steam/SteamLibrary.cs Added guard clauses on missing install paths in listing and cache load.
src/Data/ManuallyAdded/ManuallyAddedLibrary.cs Validates path and cleans up assets when path is missing.
src/Data/Game.cs New RemoveGameAssetsFromCacheAsync method to clear cached game assets.
src/Data/GOG/GOGLibrary.cs Path existence validation and asset removal in cache loading.
src/Data/EpicGamesStore/EpicGamesStoreLibrary.cs Added install-path checks and cache cleanup on missing paths.
src/Data/BattleNet/BattleNetLibrary.cs Inserted path checks and asset cache removal in load-from-cache logic.

@beeradmoore beeradmoore reopened this May 25, 2025
@beeradmoore beeradmoore merged commit deca6a5 into main May 25, 2025
@beeradmoore beeradmoore deleted the bugfix/537-installpath-not-found branch May 25, 2025 04:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants