diff options
author | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2021-08-04 20:00:52 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-08-04 20:00:52 (GMT) |
commit | 1a2c0ecfa2ef8542baee951f12b60afd165be9cf (patch) | |
tree | 0c37a4f866302924aaa2459e9cbd16c0de5900bb /Doc/library | |
parent | 60ec3b818e993eb4c57884a7a96f96a6c1eea92f (diff) | |
download | cpython-1a2c0ecfa2ef8542baee951f12b60afd165be9cf.zip cpython-1a2c0ecfa2ef8542baee951f12b60afd165be9cf.tar.gz cpython-1a2c0ecfa2ef8542baee951f12b60afd165be9cf.tar.bz2 |
[doc] bpo-43066: zipfile - add note on leading slash in the filename arg (GH-26899) (GH-27606)
Co-authored-by: Ćukasz Langa <lukasz@langa.pl>
(cherry picked from commit 7c5dab4340032eb15d3797d8b601ef11649bbab3)
Co-authored-by: andrei kulakov <andrei.avk@gmail.com>
Diffstat (limited to 'Doc/library')
-rw-r--r-- | Doc/library/zipfile.rst | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/Doc/library/zipfile.rst b/Doc/library/zipfile.rst index 7126d8b..d55a308 100644 --- a/Doc/library/zipfile.rst +++ b/Doc/library/zipfile.rst @@ -78,7 +78,6 @@ The module defines the following items: of the last modification to the file; the fields are described in section :ref:`zipinfo-objects`. - .. function:: is_zipfile(filename) Returns ``True`` if *filename* is a valid ZIP file based on its magic number, @@ -406,6 +405,11 @@ ZipFile Objects If ``arcname`` (or ``filename``, if ``arcname`` is not given) contains a null byte, the name of the file in the archive will be truncated at the null byte. + .. note:: + + A leading slash in the filename may lead to the archive being impossible to + open in some zip programs on Windows systems. + .. versionchanged:: 3.6 Calling :meth:`write` on a ZipFile created with mode ``'r'`` or a closed ZipFile will raise a :exc:`ValueError`. Previously, |