summaryrefslogtreecommitdiffstats
path: root/module/plugins/internal/SevenZip.py
diff options
context:
space:
mode:
Diffstat (limited to 'module/plugins/internal/SevenZip.py')
-rw-r--r--module/plugins/internal/SevenZip.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/module/plugins/internal/SevenZip.py b/module/plugins/internal/SevenZip.py
index 5280338dc..b5b113566 100644
--- a/module/plugins/internal/SevenZip.py
+++ b/module/plugins/internal/SevenZip.py
@@ -6,7 +6,7 @@ import re
from subprocess import Popen, PIPE
from module.plugins.internal.UnRar import ArchiveError, CRCError, PasswordError, UnRar, renice
-from module.utils import save_join
+from module.utils import fs_encode, save_join
class SevenZip(UnRar):
@@ -55,7 +55,7 @@ class SevenZip(UnRar):
def test(self, password):
# 7z can't distinguish crc and pw error in test
- p = self.call_cmd("l", "-slt", self.target)
+ p = self.call_cmd("l", "-slt", fs_encode(self.filename))
out, err = p.communicate()
if self.re_wrongpwd.search(out):
@@ -70,7 +70,7 @@ class SevenZip(UnRar):
def check(self, password):
- p = self.call_cmd("l", "-slt", self.target)
+ p = self.call_cmd("l", "-slt", fs_encode(self.filename))
out, err = p.communicate()
# check if output or error macthes the 'wrong password'-Regexp
@@ -88,7 +88,7 @@ class SevenZip(UnRar):
def extract(self, password=None):
command = "x" if self.fullpath else "e"
- p = self.call_cmd(command, '-o' + self.out, self.target, password=password)
+ p = self.call_cmd(command, '-o' + self.out, fs_encode(self.filename), password=password)
renice(p.pid, self.renice)
@@ -115,7 +115,7 @@ class SevenZip(UnRar):
def list(self, password=None):
command = "l" if self.fullpath else "l"
- p = self.call_cmd(command, self.target, password=password)
+ p = self.call_cmd(command, fs_encode(self.filename), password=password)
out, err = p.communicate()
if "Can not open" in err: