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

[QOL]: Last selected installation path is not saved between GUI restarts #244

Open
gynt opened this issue Aug 12, 2024 · 3 comments
Open
Assignees
Labels
bug Something isn't working

Comments

@gynt
Copy link
Collaborator

gynt commented Aug 12, 2024

#241 (comment)

@gynt gynt added the bug Something isn't working label Aug 12, 2024
@Krarilotus Krarilotus self-assigned this Sep 4, 2024
@TheRedDaemon TheRedDaemon self-assigned this Sep 20, 2024
@TheRedDaemon
Copy link
Collaborator

TheRedDaemon commented Sep 20, 2024

The issue here is related to the fact that the last folder paths are still saved in the global config file (along the currently not via GUI changeable file log setting for the GUI). The reason is related to Tauris file safety. To allow all saved paths after a restart/reload, the Tauri side needs to allow them, and there is no real solution to allow this from the frontend side (outside the file modals) without basically allowing the code to permit every path/file, at which point we could just disable this safety setting.

At the moment, the folders are saved on a proper shutdown via a hook. I wanted to avoid constant writes to the file. Now, the fact that this one is not triggered by the restart is worth investigating.

@TheRedDaemon
Copy link
Collaborator

Analysis:
Behaviour is reproducible. The assumption here is that the restart does not trigger the exit event that save the config file.
No other event seems fitting (DOCS), so the solution is likely to control the saving process on the GUI side, either completely or as additional feature. As part of this, the window events should be tested which of them trigger on close and which on restart.

@TheRedDaemon
Copy link
Collaborator

The issue will now be handled via the lifecycle changes in feature-improved-game-folder-lifecycle.
This will remove the GUI relaunch needed for certain changes. The only remaining case would be Updater relaunches, and these can not be handled anyway.

Stay open until the changes are on main.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: No status
Development

No branches or pull requests

3 participants