Requester
Requester copied to clipboard
fix rename backup history file #30
Coverage increased (+0.2%) to 70.608% when pulling 6c2ec64660def187d35c31efee386159a233458f on mercurykd:issue-30 into 93fd2673cf69a97b0e0d49a2411abe6148326f41 on kylebebak:master.
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.
What issue does this fix?
I can create files
a.txtandb.txtin the same directory, and callingos.rename("a.txt", "b.txt")overwrites the content ofb.txtwith that ofa.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'