summaryrefslogtreecommitdiffstats
path: root/module/plugins/internal/UnRar.py
diff options
context:
space:
mode:
Diffstat (limited to 'module/plugins/internal/UnRar.py')
-rw-r--r--module/plugins/internal/UnRar.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/module/plugins/internal/UnRar.py b/module/plugins/internal/UnRar.py
index 188fc88bb..220dd6365 100644
--- a/module/plugins/internal/UnRar.py
+++ b/module/plugins/internal/UnRar.py
@@ -8,7 +8,7 @@ from string import digits
from subprocess import Popen, PIPE
from module.plugins.internal.Extractor import Extractor, ArchiveError, CRCError, PasswordError
-from module.utils import fs_decode, save_join
+from module.utils import fs_decode, fs_encode, save_join
def renice(pid, value):
@@ -89,7 +89,7 @@ class UnRar(Extractor):
def test(self, password):
- p = self.call_cmd("t", "-v", self.target, password=password)
+ p = self.call_cmd("t", "-v", fs_encode(self.filename), password=password)
self._progress(p)
err = p.stderr.read().strip()
@@ -101,7 +101,7 @@ class UnRar(Extractor):
def check(self, password):
- p = self.call_cmd("l", "-v", self.target, password=password)
+ p = self.call_cmd("l", "-v", fs_encode(self.filename), password=password)
out, err = p.communicate()
if self.re_wrongpwd.search(err):
@@ -117,7 +117,7 @@ class UnRar(Extractor):
def repair(self):
- p = self.call_cmd("rc", self.target)
+ p = self.call_cmd("rc", fs_encode(self.filename))
# communicate and retrieve stderr
self._progress(p)
@@ -149,7 +149,7 @@ class UnRar(Extractor):
def extract(self, password=None):
command = "x" if self.fullpath else "e"
- p = self.call_cmd(command, self.target, self.out, password=password)
+ p = self.call_cmd(command, fs_encode(self.filename), self.out, password=password)
renice(p.pid, self.renice)
@@ -189,7 +189,7 @@ class UnRar(Extractor):
def list(self, password=None):
command = "vb" if self.fullpath else "lb"
- p = self.call_cmd(command, "-v", self.target, password=password)
+ p = self.call_cmd(command, "-v", fs_encode(self.filename), password=password)
out, err = p.communicate()
if "Cannot open" in err: