summaryrefslogtreecommitdiffstats
path: root/module/Utils.py
diff options
context:
space:
mode:
authorGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2011-11-15 23:10:26 +0100
committerGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2011-11-15 23:10:26 +0100
commit6891645614426aab6fae1561ba925f81b214e993 (patch)
tree20cd3963d4e05af10fa0eae2b899181b699bc128 /module/Utils.py
parentimproved plugin loader, import hook to always use newest plugin versions (diff)
downloadpyload-6891645614426aab6fae1561ba925f81b214e993.tar.xz
closed #420
Diffstat (limited to 'module/Utils.py')
-rw-r--r--module/Utils.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/module/Utils.py b/module/Utils.py
index 939baad96..36713b778 100644
--- a/module/Utils.py
+++ b/module/Utils.py
@@ -32,6 +32,12 @@ def removeChars(string, repl):
elif type(string) == unicode:
return string.translate(dict([(ord(s), None) for s in repl]))
+def save_path(name):
+ #remove some chars
+ if os.name == 'nt':
+ return removeChars(name, '/\\?%*:|"<>')
+ else:
+ return removeChars(name, '/\\"')
def save_join(*args):
""" joins a path, encoding aware """