In Windows, 'os.rename' raises FileExistsError for overwrite
laoraid opened this issue · comments
Describe the bug
Visit https://docs.python.org/3/library/os.html#os.rename
Overwriting files in Windows raises FileExistsError.(__main__.py
line 326)
According to the document, I think it would be better to use replace() for cross-platform.
To Reproduce
Steps to reproduce the behavior:
- Setup directories and files in windows
- Install
pigar
.. - Run
pigar
.. - See error..
Expected behavior
Overwrite requirements.txt.
Context (Environment)
- OS: Windows 11
- Version of
Python
: 3.11.5 - Version of
pigar
: 2.1.1
Thank you for the report. Could you provide a detailed traceback? We would greatly appreciate if you could submit a Pull Request to directly address this issue.
Oh.. I see, did you mean this line?
Line 326 in 3fd8f22