]> granicus.if.org Git - python/commitdiff
Issue #6972: fix the documentation mis applied patch.
authorGregory P. Smith <greg@krypto.org>
Fri, 8 Feb 2013 06:11:03 +0000 (22:11 -0800)
committerGregory P. Smith <greg@krypto.org>
Fri, 8 Feb 2013 06:11:03 +0000 (22:11 -0800)
Doc/library/zipfile.rst

index cf62d497cb42eee900474a4e5edac52f20e755ec..ebb139451557b4ef4c58eb1a61da40002ea880d0 100644 (file)
@@ -213,6 +213,16 @@ ZipFile Objects
 
    .. versionadded:: 2.6
 
+   .. note::
+
+      If a member filename is an absolute path, a drive/UNC sharepoint and
+      leading (back)slashes will be stripped, e.g.: ``///foo/bar`` becomes
+      ``foo/bar`` on Unix, and ``C:\foo\bar`` becomes ``foo\bar`` on Windows.
+      And all ``".."`` components in a member filename will be removed, e.g.:
+      ``../../foo../../ba..r`` becomes ``foo../ba..r``.  On Windows illegal
+      characters (``:``, ``<``, ``>``, ``|``, ``"``, ``?``, and ``*``)
+      replaced by underscore (``_``).
+
 
 .. method:: ZipFile.extractall([path[, members[, pwd]]])
 
@@ -227,6 +237,9 @@ ZipFile Objects
       It is possible that files are created outside of *path*, e.g. members
       that have absolute filenames starting with ``"/"`` or filenames with two
       dots ``".."``.
+      
+   .. versionchanged:: 2.7.4
+      The zipfile module attempts to prevent that.  See :meth:`extract` note.
 
    .. versionadded:: 2.6
 
@@ -242,16 +255,6 @@ ZipFile Objects
 
    .. versionadded:: 2.6
 
-   .. note::
-
-      If a member filename is an absolute path, a drive/UNC sharepoint and
-      leading (back)slashes will be stripped, e.g.: ``///foo/bar`` becomes
-      ``foo/bar`` on Unix, and ``C:\foo\bar`` becomes ``foo\bar`` on Windows.
-      And all ``".."`` components in a member filename will be removed, e.g.:
-      ``../../foo../../ba..r`` becomes ``foo../ba..r``.  On Windows illegal
-      characters (``:``, ``<``, ``>``, ``|``, ``"``, ``?``, and ``*``)
-      replaced by underscore (``_``).
-
 
 .. method:: ZipFile.read(name[, pwd])