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

[Bug report] Savegames temporarly gone after patching #359

Open
Pyrdacor opened this issue Aug 16, 2023 · 1 comment
Open

[Bug report] Savegames temporarly gone after patching #359

Pyrdacor opened this issue Aug 16, 2023 · 1 comment
Assignees
Labels
bug Something isn't working enhancement New feature or request pending reproduction Needs further input/testing/reproduction by the issuer

Comments

@Pyrdacor
Copy link
Owner

In general Windows users just start the app with normal privileges (not admin). In this case the app has often no write permissions inside the app folder. In this case the app checks for that and fallbacks to some user application data folder for savegames, screenshots and the configuration file.

However when patching the application explicitly asks for admin rights because it needs to copy files. But then the app itself is also started with admin rights and then might be able to write to the app folder directly.

The problem now is that the saves are inside the user application data folder while the current app instance expects them in the app folder (as it now has write access and can't know that it is only temporary).

It could be fixed by starting the app with normal privileges after patching but this is only half the solution. The user can decide to start the app with admin rights at any time and won't see pre-existing saves then as well.

It might be better to do the following:

  • Check both folders for existing configs, savegames and screenshots.
  • If they exist in only one of them, load them from there.
  • Regarding saving:
    • If the saves and config exist in the user app data folder, always save changes there even with app folder write access
    • If the saves and config exist in the app folder:
      • If you have write access to that folder, store them there
      • Otherwise copy them over to the user application data folder (only when saving changes) and save changes there afterwards

There might be a remaining problem. If the last saving case happens and afterwards the user starts with admin rights, the first saving case will prevent from saving inside the app folder forever. However there might be old saves and configs and the user might wonder why they are not updated.

@Pyrdacor Pyrdacor added the bug Something isn't working label Aug 16, 2023
@Pyrdacor Pyrdacor self-assigned this Aug 16, 2023
@Pyrdacor Pyrdacor added the enhancement New feature or request label Aug 16, 2023
@Pyrdacor
Copy link
Owner Author

Needs testing but maybe the patcher now starts the exe with normal privileges after patching.

@Pyrdacor Pyrdacor added the pending reproduction Needs further input/testing/reproduction by the issuer label Dec 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request pending reproduction Needs further input/testing/reproduction by the issuer
Projects
None yet
Development

No branches or pull requests

1 participant