From 8b432eb80715f84800febb88620d943211e28051 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Wed, 4 Mar 2015 02:21:50 +0100 Subject: Revert 3a9c167ceca27d57dbef927626fe853a3d0e30b2 --- module/plugins/internal/UnZip.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'module/plugins/internal/UnZip.py') diff --git a/module/plugins/internal/UnZip.py b/module/plugins/internal/UnZip.py index dd57a54a7..d95afbc70 100644 --- a/module/plugins/internal/UnZip.py +++ b/module/plugins/internal/UnZip.py @@ -7,6 +7,7 @@ import sys import zipfile from module.plugins.internal.Extractor import Extractor, ArchiveError, CRCError, PasswordError +from module.utils import fs_encode class UnZip(Extractor): @@ -28,7 +29,7 @@ class UnZip(Extractor): def list(self, password=None): - with zipfile.ZipFile(self.target, 'r', allowZip64=True) as z: + with zipfile.ZipFile(fs_encode(self.filename), 'r', allowZip64=True) as z: z.setpassword(password) return z.namelist() @@ -38,7 +39,7 @@ class UnZip(Extractor): def test(self): - with zipfile.ZipFile(self.target, 'r', allowZip64=True) as z: + with zipfile.ZipFile(fs_encode(self.filename), 'r', allowZip64=True) as z: badfile = z.testzip() if badfile: @@ -49,7 +50,7 @@ class UnZip(Extractor): def extract(self, password=None): try: - with zipfile.ZipFile(self.target, 'r', allowZip64=True) as z: + with zipfile.ZipFile(fs_encode(self.filename), 'r', allowZip64=True) as z: z.setpassword(password) badfile = z.testzip() -- cgit v1.2.3