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

Possible logic error in settings.xml rename process at start #17

Closed
Wolf-Z opened this issue Feb 9, 2021 · 3 comments
Closed

Possible logic error in settings.xml rename process at start #17

Wolf-Z opened this issue Feb 9, 2021 · 3 comments

Comments

@Wolf-Z
Copy link

Wolf-Z commented Feb 9, 2021

After starting sctime (from latest master (df0149c) I get an error like

"settings.xml.tmp cannot be renamed to settings.xml" (as message box) while indeed settings.xml has a new timestamp afterwards.

"Permissions denied" is also shown - but all files are RW (also the Directory above with +x).

The previous commit works instead.

Looks like this bug was introduced with the current commit df0149c .
I also used strace to look into this issue. The rename return codes are always "0".

Thx! :)

@desperadoduck
Copy link
Member

yes, 0 means success. I'll fix the code.

@desperadoduck
Copy link
Member

the thing is, QFile::rename (which we use for the windows case) has the logic the other way round, so one has to be careful here. Thanks for spotting that!

@desperadoduck
Copy link
Member

should be fixed now

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