diff options
author | RaNaN <Mast3rRaNaN@hotmail.de> | 2010-09-23 15:10:31 +0200 |
---|---|---|
committer | RaNaN <Mast3rRaNaN@hotmail.de> | 2010-09-23 15:10:31 +0200 |
commit | d8d723982413622c8e0ea11369935e656dbe6a23 (patch) | |
tree | 67adb041cfb9ce91ca959e2793063ba136c51ea5 | |
parent | package ui improvements (diff) | |
download | pyload-d8d723982413622c8e0ea11369935e656dbe6a23.tar.xz |
correct unrar tmp folder
-rw-r--r-- | module/pyunrar.py | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/module/pyunrar.py b/module/pyunrar.py index b39c176d6..a2810b66e 100644 --- a/module/pyunrar.py +++ b/module/pyunrar.py @@ -95,9 +95,7 @@ class Unrar(): if not tmpdir: self.tmpdir = mkdtemp() else: - self.tmpdir = tmpdir+"_" + m.group(1) if m else archive.replace(".rar", "") - if not exists(self.tmpdir): - makedirs(self.tmpdir) + self.tmpdir = tmpdir +"_" + basename(archive).replace(".rar", "").replace(".","") def listContent(self, password=None): """ @@ -270,6 +268,8 @@ class Unrar(): except WrongPasswordError: continue tdir = self.tmpdir + if not exists(tdir): + makedirs(tdir) try: self.extract(password=password, fullPath=fullPath, destination=tdir, overwrite=overwrite, statusFunction=statusFunction, files=sf) except WrongPasswordError: @@ -303,7 +303,6 @@ class Unrar(): break finally: rmtree(tdir) - pass try: self.extract(password=correctPassword, fullPath=fullPath, destination=destination, overwrite=overwrite, statusFunction=statusFunction, exclude=exclude) self.password = correctPassword |