YoSTEALTH <[email protected]> added the comment:
Martin, your points got me thinking... to make a proper copy of a file, it
should be done using bytes! Text IO could easily lead to corrupting your file.
for example (current function):
with open(old_path, 'r', encoding='latin-1') as fsrc:
with open(new_path, 'w') as fdst:
copyfileobj(fsrc, fdst)
This would lead you to have wrongly encoded file with different filesize.
----------
_______________________________________
Python tracker <[email protected]>
<https://bugs.python.org/issue32529>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com