Andrei Kulakov <andrei....@gmail.com> added the comment:
I propose fixing this in documentation. Raising an error is probably not warranted because zip files are often created on one system and used on another, so you can't raise an error based on current OS, and having a leading slash in the name is both useful and does work in MacOS and Unix. It probably works in some unzip programs on Windows as well (if anyone can test that would be great). Therefore I propose adding the following notes to ZipInfo, ZipFile.write() and ZipFile.writestr(): Note: a leading slash in the archive / filename may lead to the archive being un-openable in some zip programs on Windows systems. If that sounds good I can make a PR. ---------- nosy: +andrei.avk _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue43066> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com