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

[lfs] Check if AppData/ProgramData paths exist #421

Merged
merged 2 commits into from
May 29, 2022
Merged

[lfs] Check if AppData/ProgramData paths exist #421

merged 2 commits into from
May 29, 2022

Conversation

CommandMC
Copy link
Contributor

@CommandMC CommandMC commented Apr 14, 2022

When a user had EGL sync enabled and then deleted/uninstalled the EGL, we would still try to load manifests from the directories, which lead to just about every feature breaking & a somewhat inconclusive stacktrace.
This PR avoids this issue by not reading manifests/configuration data when the folders don't exist.

Maybe we should also turn off egl sync if this happens?

@derrod derrod merged commit 823d672 into derrod:master May 29, 2022
@StefanLobbenmeier
Copy link

There might be a regression for this, not sure. I just tested this on Windows:

C:\Users\Stefan> C:\Users\Stefan\AppData\Local\Programs\heroic\resources\app.asar.unpacked\build\bin\win32\legendary launch 76233c0af0a441c7bd541e7d7ab3cde1 --language en
[Core] INFO: Synced app "76233c0af0a441c7bd541e7d7ab3cde1" is no longer in the EGL manifest list.
[Core] INFO: Game files exist, assuming game is still installed, re-exporting to EGL...
Traceback (most recent call last):
  File "legendary\cli.py", line 3051, in <module>
  File "legendary\cli.py", line 2966, in main
  File "legendary\cli.py", line 564, in launch_game
  File "legendary\core.py", line 560, in get_installed_game
  File "legendary\core.py", line 1816, in egl_sync
  File "legendary\core.py", line 1802, in egl_restore_or_uninstall
  File "legendary\core.py", line 1779, in egl_export
  File "legendary\lfs\egl.py", line 85, in set_manifest
ValueError: EGS ProgramData path does not exist
[4900] Failed to execute script 'cli' due to unhandled exception!

Version seems to be the latest:

C:\Users\Stefan> C:\Users\Stefan\AppData\Local\Programs\heroic\resources\app.asar.unpacked\build\bin\win32\legendary
usage: legendary.exe [-h] [-H] [-v] [-y] [-V] [-J] [-A <seconds>] <command> ...
Legendary v0.20.27 - "Dark Energy (hotfix)"

@StefanLobbenmeier
Copy link

StefanLobbenmeier commented Aug 21, 2022

Ahh no, sorry - this behaviour was introduced by this PR.

Maybe we should also turn off egl sync if this happens?

I guess this would have been a good idea.

I was able to fix it on my machine by running legendary egl-sync --disable-sync, so hopefully this will help people out in the future.

@danbracey
Copy link

Ahh no, sorry - this behaviour was introduced by this PR.

Maybe we should also turn off egl sync if this happens?

I guess this would have been a good idea.

I was able to fix it on my machine by running legendary egl-sync --disable-sync, so hopefully this will help people out in the future.

Thank you so much! Had the same error on Heroic V2.7.1 (latest at time of writing) and this fixed it!

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.

None yet

4 participants