summaryrefslogtreecommitdiffstats
path: root/module/plugins/internal/UnZip.py
diff options
context:
space:
mode:
authorGravatar Walter Purcaro <vuolter@gmail.com> 2015-03-04 02:21:50 +0100
committerGravatar Walter Purcaro <vuolter@gmail.com> 2015-03-04 02:21:50 +0100
commit8b432eb80715f84800febb88620d943211e28051 (patch)
treeeabc9cd771e9240ce895aee417d60412924c0693 /module/plugins/internal/UnZip.py
parent[ClickAndLoad] Revert and improve (diff)
downloadpyload-8b432eb80715f84800febb88620d943211e28051.tar.xz
Diffstat (limited to 'module/plugins/internal/UnZip.py')
-rw-r--r--module/plugins/internal/UnZip.py7
1 files changed, 4 insertions, 3 deletions
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()