Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Only try to do EOS operations on a path if there's actually a Wineprefix there #3410

Merged
merged 1 commit into from Jan 7, 2024

Conversation

CommandMC
Copy link
Collaborator

Previously, trying to enable/disable/check the status of the EOS overlay for a game with an invalid prefix directory would lead to an error message.
We're now handling this correctly (not enabling/disabling it, always reporting that it's disabled)

Technically, this works by adding:

  • a new type, ValidWinePrefix. It's an extension of the Path type, meaning it already makes sure the string inside it is a valid path, and it now also verifies that there's a user.reg file inside the directory it's pointing to
  • a new function inside the EOS handler, getWinePrefixFolder. It deduplicates some of the logic used in the enable/disable/isEnabled, and now also makes sure the configured prefix path is contains a valid prefix

Error message before:
image

No error message now:
image


Use the following Checklist if you have changed something on the Backend or Frontend:

  • Tested the feature and it's working on a current and clean install.
  • Tested the main App features and they are still working on a current and clean install. (Login, Install, Play, Uninstall, Move games, etc.)
  • Created / Updated Tests (If necessary)
  • Created / Updated documentation (If necessary)

…fix there

Previously, trying to enable/disable/check the status of the EOS overlay
for a game with an invalid prefix directory would lead to an error
message.
We're now handling this correctly (not enabling/disabling it, always
reporting that it's disabled)
@CommandMC CommandMC added the pr:ready-for-review Feature-complete, ready for the grind! :P label Jan 7, 2024
@CommandMC CommandMC requested a review from a team January 7, 2024 11:19
@CommandMC CommandMC self-assigned this Jan 7, 2024
@CommandMC CommandMC requested review from arielj, flavioislima, Etaash-mathamsetty, Nocccer and imLinguin and removed request for a team January 7, 2024 11:19
Copy link
Member

@flavioislima flavioislima left a comment

Choose a reason for hiding this comment

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

Nice fix!

@flavioislima flavioislima merged commit 9d128f7 into main Jan 7, 2024
9 checks passed
@flavioislima flavioislima deleted the fix/eos-overlay-invalid-prefix branch January 7, 2024 13:20
@Heroic-Games-Launcher Heroic-Games-Launcher locked and limited conversation to collaborators Jan 7, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
pr:ready-for-review Feature-complete, ready for the grind! :P
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants