summaryrefslogtreecommitdiffstats
path: root/module/plugins/hooks
diff options
context:
space:
mode:
authorGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2010-09-16 17:27:32 +0200
committerGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2010-09-16 17:27:32 +0200
commit353276e59af0d94085645e5cd46342f6704c244b (patch)
tree2464661c9b12947fa2ebf99548f6f7a73e7a0ff7 /module/plugins/hooks
parentcli command mode (diff)
downloadpyload-353276e59af0d94085645e5cd46342f6704c244b.tar.xz
unrar fix
Diffstat (limited to 'module/plugins/hooks')
-rw-r--r--module/plugins/hooks/UnRar.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/module/plugins/hooks/UnRar.py b/module/plugins/hooks/UnRar.py
index 8acc853d4..6bd650b4a 100644
--- a/module/plugins/hooks/UnRar.py
+++ b/module/plugins/hooks/UnRar.py
@@ -56,14 +56,15 @@ class UnRar(Hook):
def addPassword(self, pws):
if not type(pws) == list: pws = [pws]
+ pws.reverse()
for pw in pws:
pw = pw.strip()
if not pw or pw == "None" or pw in self.passwords: continue
self.passwords.insert(0, pw)
with open(self.getConfig("passwordfile"), "w") as f:
- f.writelines(self.comments)
- f.writelines(self.passwords)
+ f.writelines([c+"\n" for c in self.comments])
+ f.writelines([p+"\n" for p in self.passwords])
def removeFiles(self, pack, fname):
if not self.getConfig("deletearchive"):