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

Avoid overwriting an invalid/corrupt preferences file. #4361

Open
wants to merge 1 commit into
base: master
from

Conversation

@jostephd
Copy link
Member

commented Sep 18, 2019

For #1326

Example:

$ mkdir /tmp/foo
$ echo '[foo]' > /tmp/foo/preferences
$ ./wesnoth --userconfig-dir=/tmp/foo

Before this patch, /tmp/foo/preferences would be overwritten. With this patch, it would be preserved.

Example:

$ mkdir /tmp/foo
$ echo '[foo]' > /tmp/foo/preferences
$ ./wesnoth --userconfig-dir=/tmp/foo

Before this patch, /tmp/foo/preferences would be overwritten.  With this patch,
it would be preserved.
@gfgtdf

This comment has been minimized.

Copy link
Contributor

commented Sep 18, 2019

so wesnoth now just closes? for people that don't know how to access this file this would mean that wesnoth is then permanently broken for them right?

I think it'd be better if wesnoth would just make a backup of the corrupted file and then overwrites it as it did before.

@jostephd

This comment has been minimized.

Copy link
Member Author

commented Sep 18, 2019

for people that don't know how to access this file this would mean that wesnoth is then permanently broken for them right?

The error message gives the path of the file.

I think it'd be better if wesnoth would just make a backup of the corrupted file and then overwrites it as it did before.

#1326 (comment), third paragraph.

@jostephd

This comment has been minimized.

Copy link
Member Author

commented Sep 25, 2019

Changes requested on #1326.

@jostephd jostephd removed their assignment Sep 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.