summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2006-02-20 08:40:38 (GMT)
committerGeorg Brandl <georg@python.org>2006-02-20 08:40:38 (GMT)
commit8f7c54eaa5e363ef02e99518253b3cb17f6602e6 (patch)
tree80de626902f35cd4d90f271c4641b020b256f4f6 /Doc
parent200a58058a504da4cc2f9145e671b009b0bedd27 (diff)
downloadcpython-8f7c54eaa5e363ef02e99518253b3cb17f6602e6.zip
cpython-8f7c54eaa5e363ef02e99518253b3cb17f6602e6.tar.gz
cpython-8f7c54eaa5e363ef02e99518253b3cb17f6602e6.tar.bz2
Bug #1413790: zipfile now sanitizes absolute archive names that are
not allowed by the specs.
Diffstat (limited to 'Doc')
-rw-r--r--Doc/lib/libzipfile.tex7
1 files changed, 5 insertions, 2 deletions
diff --git a/Doc/lib/libzipfile.tex b/Doc/lib/libzipfile.tex
index a0b5e63..32ca3e0 100644
--- a/Doc/lib/libzipfile.tex
+++ b/Doc/lib/libzipfile.tex
@@ -140,10 +140,13 @@ cat myzip.zip >> python.exe
compress_type}}}
Write the file named \var{filename} to the archive, giving it the
archive name \var{arcname} (by default, this will be the same as
- \var{filename}). If given, \var{compress_type} overrides the value
+ \var{filename}, but without a drive letter and with leading path
+ separators removed). If given, \var{compress_type} overrides the value
given for the \var{compression} parameter to the constructor for
the new entry. The archive must be open with mode \code{'w'} or
- \code{'a'}.
+ \code{'a'}.
+ \note{Archive names should be relative to the archive root, that is,
+ they should not start with a path separator.}
\end{methoddesc}
\begin{methoddesc}{writestr}{zinfo_or_arcname, bytes}