From 353276e59af0d94085645e5cd46342f6704c244b Mon Sep 17 00:00:00 2001 From: RaNaN Date: Thu, 16 Sep 2010 17:27:32 +0200 Subject: unrar fix --- module/plugins/hooks/UnRar.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'module/plugins/hooks/UnRar.py') 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"): -- cgit v1.2.3