We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bdd5731 commit d2c256fCopy full SHA for d2c256f
Lib/test/test_pathlib/support/zip_path.py
@@ -36,7 +36,9 @@ def teardown(self, root):
36
root.zip_file.close()
37
38
def create_file(self, path, data=b''):
39
- path.zip_file.writestr(vfspath(path), data)
+ zip_info = zipfile.ZipInfo(vfspath(path))
40
+ zip_info.filename = vfspath(path) # Undo sanitization
41
+ path.zip_file.writestr(zip_info, data)
42
43
def create_dir(self, path):
44
zip_info = zipfile.ZipInfo(vfspath(path) + '/')
0 commit comments