summaryrefslogtreecommitdiffstats
path: root/module/plugins
diff options
context:
space:
mode:
authorGravatar Jens Hörnlein <jens.hoernlein@googlemail.com> 2015-02-06 21:52:10 +0100
committerGravatar Jens Hörnlein <jens.hoernlein@googlemail.com> 2015-02-06 21:52:10 +0100
commit767cf1ccb4420e7cb1805bfe302b8909def79679 (patch)
tree789052a545689eb91b3893bf17a531eb4829331e /module/plugins
parent[ExtractArchive] Error Handling when broken ExtractArchive was used (diff)
downloadpyload-767cf1ccb4420e7cb1805bfe302b8909def79679.tar.xz
[ExtractArchive] Fixed: Recursive Extraction
Diffstat (limited to 'module/plugins')
-rw-r--r--module/plugins/hooks/ExtractArchive.py8
1 files changed, 3 insertions, 5 deletions
diff --git a/module/plugins/hooks/ExtractArchive.py b/module/plugins/hooks/ExtractArchive.py
index 4756d359c..e27c544d6 100644
--- a/module/plugins/hooks/ExtractArchive.py
+++ b/module/plugins/hooks/ExtractArchive.py
@@ -77,10 +77,6 @@ class ArchiveQueue(object):
return self.plugin.setStorage("ExtractArchive:%s" % self.storage, item.encode('base64')[:-1])
- def clean(self):
- return self.set([])
-
-
def delete(self):
return self.plugin.delStorage("ExtractArchive:%s" % self.storage)
@@ -99,6 +95,8 @@ class ArchiveQueue(object):
queue.remove(item)
except ValueError:
pass
+ if queue == []:
+ return self.delete()
return self.set(queue)
@@ -315,7 +313,7 @@ class ExtractArchive(Hook):
self.setPermissions(new_files)
for filename in new_files:
- file = fs_encode(save_join(filename, os.path.dirname(archive.filename)))
+ file = fs_encode(save_join(os.path.dirname(archive.filename), filename))
if not os.path.exists(file):
self.logDebug("New file %s does not exists" % filename)
continue