diff options
author | Walter Purcaro <vuolter@gmail.com> | 2015-01-29 23:19:39 +0100 |
---|---|---|
committer | Walter Purcaro <vuolter@gmail.com> | 2015-01-29 23:19:39 +0100 |
commit | 096e457a5a44e1ade87504147468fda045e07a88 (patch) | |
tree | f906370ae50decd0e4ccda337163e1f5885821a0 /module | |
parent | Update Extractor (2) (diff) | |
download | pyload-096e457a5a44e1ade87504147468fda045e07a88.tar.xz |
[ExtractArchive] Fix password recognition
Diffstat (limited to 'module')
-rw-r--r-- | module/plugins/hooks/ExtractArchive.py | 7 |
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]): |