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

Delete old windows installation when updating #1

Closed
ziproot opened this issue Oct 21, 2023 · 4 comments
Closed

Delete old windows installation when updating #1

ziproot opened this issue Oct 21, 2023 · 4 comments

Comments

@ziproot
Copy link

ziproot commented Oct 21, 2023

If you try to update the game on windows in a case where a file is in the data folder that has been removed upstream, ESManager will not remove that file. ESManager should move the old windows installation to a backup, replacing a previous backup if it exists, and delete the old windows installation once it has confirmed that there is a new one upstream.

@ziproot
Copy link
Author

ziproot commented Oct 21, 2023

See EndlessSkyCommunity/ESLauncher2#82 (comment) for a similar issue with ESLauncher2

@tibetiroka
Copy link
Owner

Which version of ESManager are you using? Which option did you choose to obtain the executable?

@tibetiroka
Copy link
Owner

Okay, I'm going to assume you used the default "Latest Release" option when creating your instance, as that's the only one I can reproduce the issue with. This should be fixed by dc0db49.

The new version puts the downloads in a temporary directory, then moves the current one to a backup, and either deletes or restores the backup based on whether the downloads could be moved to their proper place. This system, while isn't foolproof, shouldn't really break in practice. (There are some edge cases with file system moves failing as I don't verify the files before/after moving them, so partial moves would mess things up, but that's not something I can really handle here. Stuff like that.)

I did some small tests and it seems to work. One thing to note here is that this will not fix your existing instances until the next update, so if you have any instances that are currently broken, you will need to delete and re-create them.

If this was indeed how you ran into the issue, I can push a new release with this bugfix.

@ziproot
Copy link
Author

ziproot commented Oct 22, 2023

I did indeed use the latest release option.

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

No branches or pull requests

2 participants