summaryrefslogtreecommitdiffstats
path: root/module/plugins/Plugin.py
diff options
context:
space:
mode:
authorGravatar Jeix <devnull@localhost> 2011-04-13 10:55:06 +0200
committerGravatar Jeix <devnull@localhost> 2011-04-13 10:55:06 +0200
commit6d7dd4af275126f07fda135d1fb897d8494efa7c (patch)
treecf5dc4c35ebc9568340c3c9d28e4ff5fe7a9956d /module/plugins/Plugin.py
parentinformation page for webif (diff)
downloadpyload-6d7dd4af275126f07fda135d1fb897d8494efa7c.tar.xz
shragle fix
Diffstat (limited to 'module/plugins/Plugin.py')
-rw-r--r--module/plugins/Plugin.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/module/plugins/Plugin.py b/module/plugins/Plugin.py
index 8d9d8b35d..488d05432 100644
--- a/module/plugins/Plugin.py
+++ b/module/plugins/Plugin.py
@@ -27,6 +27,7 @@ from os import remove
from os import makedirs
from os import chmod
from os import stat
+from os import name as os_name
from os.path import exists
from os.path import join
@@ -348,6 +349,10 @@ class Plugin(object):
self.log.warning(_("Setting User and Group failed: %s") % str(e))
name = self.pyfile.name
+ if os_name == 'nt':
+ #delete illegal characters
+ name = name.translate(None, '/\\?%*:|"<>')
+
filename = save_join(location, name)
try:
newname = self.req.httpDownload(url, filename, get=get, post=post, ref=ref, chunks=self.getChunkCount(), resume=self.resumeDownload, progressNotify=self.pyfile.progress.setValue)