summaryrefslogtreecommitdiffstats
path: root/module
diff options
context:
space:
mode:
authorGravatar Walter Purcaro <vuolter@gmail.com> 2015-01-29 23:19:39 +0100
committerGravatar Walter Purcaro <vuolter@gmail.com> 2015-01-29 23:19:39 +0100
commit096e457a5a44e1ade87504147468fda045e07a88 (patch)
treef906370ae50decd0e4ccda337163e1f5885821a0 /module
parentUpdate Extractor (2) (diff)
downloadpyload-096e457a5a44e1ade87504147468fda045e07a88.tar.xz
[ExtractArchive] Fix password recognition
Diffstat (limited to 'module')
-rw-r--r--module/plugins/hooks/ExtractArchive.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/module/plugins/hooks/ExtractArchive.py b/module/plugins/hooks/ExtractArchive.py
index f2bc11ec2..8c5af1bb5 100644
--- a/module/plugins/hooks/ExtractArchive.py
+++ b/module/plugins/hooks/ExtractArchive.py
@@ -329,6 +329,8 @@ class ExtractArchive(Hook):
pyfile.setCustomStatus(_("extracting"))
pyfile.setProgress(0)
+ encrypted = False
+
try:
try:
archive.check()
@@ -337,11 +339,12 @@ class ExtractArchive(Hook):
self.logInfo(fname, _("Header protected"))
if self.getConfig("repair"):
- self.logWarning(fname, "Repairing...")
+ self.logWarning(fname, _("Repairing..."))
archive.repair()
except PasswordError):
self.logInfo(fname, _("Password protected"))
+ encrypted = True
except ArchiveError, e:
if e != "Empty Archive" or not self.getConfig("extractempty"):
@@ -349,7 +352,7 @@ class ExtractArchive(Hook):
self.logDebug("Password: %s" % (password or "No provided"))
- if not self.getConfig("usepasswordfile"):
+ if not encrypted or not self.getConfig("usepasswordfile"):
archive.extract(password)
else:
for pw in set(self.getPasswords(False) + [password]):