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

fix rename backup history file #30 #32

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mercurykd
Copy link

No description provided.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.2%) to 70.608% when pulling 6c2ec64 on mercurykd:issue-30 into 93fd267 on kylebebak:master.

@kylebebak
Copy link
Owner

What issue does this fix?

I can create files a.txt and b.txt in the same directory, and calling os.rename("a.txt", "b.txt") overwrites the content of b.txt with that of a.txt.

In other words, this code works as expected. Your PR tries to remove the backup file before renaming the main file to the backup file. I don't see what that could achieve.

@mercurykd
Copy link
Author

mercurykd commented Apr 13, 2021

What issue does this fix?

I can create files a.txt and b.txt in the same directory, and calling os.rename("a.txt", "b.txt") overwrites the content of b.txt with that of a.txt.

Then why does the error occur? FileExistsError: [WinError 183] The file cannot be created because it already exists: 'C:\Users\User\AppData\Roaming\Sublime Text 3\Packages\User\Requester.history.json.bkp'

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

Successfully merging this pull request may close these issues.

None yet

3 participants