summaryrefslogtreecommitdiffstats
path: root/module/plugins/hooks
diff options
context:
space:
mode:
authorGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2010-11-14 19:59:46 +0100
committerGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2010-11-14 19:59:46 +0100
commitc8ec9863db0b0ed07a0fc27426d50a239741e83c (patch)
tree70dcc1f75d89d6cf9669f7a09cc74f586156debd /module/plugins/hooks
parenthotfolder linklist fix (diff)
downloadpyload-c8ec9863db0b0ed07a0fc27426d50a239741e83c.tar.xz
hotfolder fix
Diffstat (limited to 'module/plugins/hooks')
-rw-r--r--module/plugins/hooks/HotFolder.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/module/plugins/hooks/HotFolder.py b/module/plugins/hooks/HotFolder.py
index 2e210c8a2..e652179ce 100644
--- a/module/plugins/hooks/HotFolder.py
+++ b/module/plugins/hooks/HotFolder.py
@@ -59,10 +59,13 @@ class HotFolder(Hook):
f = open(self.getConfig("file"), "rb")
content = f.read().strip()
f.close()
+ f = open(self.getConfig("file"), "wb")
+ f.close()
if content:
- name = "%s_%s.txt" % (self.getConfig("file"), time.strftime("%H-%M-%S %d%b%Y") )
+ name = "%s_%s.txt" % (self.getConfig("file"), time.strftime("%H-%M-%S_%d%b%Y") )
- f = open(join(self.getConfig("folder"), name), "wb")
+ f = open(join(self.getConfig("folder"), "finished", name), "wb")
+ f.write(content)
f.close()
self.core.server_methods.add_package(f.name, [f.name], 1)