File tree Expand file tree Collapse file tree 2 files changed +7
-1
lines changed
Misc/NEWS.d/next/Documentation Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -78,7 +78,6 @@ The module defines the following items:
78
78
of the last modification to the file; the fields are described in section
79
79
:ref: `zipinfo-objects `.
80
80
81
-
82
81
.. function :: is_zipfile(filename)
83
82
84
83
Returns ``True `` if *filename * is a valid ZIP file based on its magic number,
@@ -406,6 +405,11 @@ ZipFile Objects
406
405
If ``arcname `` (or ``filename ``, if ``arcname `` is not given) contains a null
407
406
byte, the name of the file in the archive will be truncated at the null byte.
408
407
408
+ .. note ::
409
+
410
+ A leading slash in the filename may lead to the archive being impossible to
411
+ open in some zip programs on Windows systems.
412
+
409
413
.. versionchanged :: 3.6
410
414
Calling :meth: `write ` on a ZipFile created with mode ``'r' `` or
411
415
a closed ZipFile will raise a :exc: `ValueError `. Previously,
Original file line number Diff line number Diff line change
1
+ Added a warning to :mod: `zipfile ` docs: filename arg with a leading slash may cause archive to
2
+ be un-openable on Windows systems.
You can’t perform that action at this time.
0 commit comments