summaryrefslogtreecommitdiffstats
path: root/module/utils.py
diff options
context:
space:
mode:
authorGravatar Walter Purcaro <vuolter@gmail.com> 2014-07-14 03:23:54 +0200
committerGravatar Walter Purcaro <vuolter@gmail.com> 2014-07-14 03:23:54 +0200
commit40d188eb6260d6e53154649fce3ae449477cc6bf (patch)
tree4b7b6bfcad0ce1bc93e0e8fc4cf9d12f9f8dcb80 /module/utils.py
parent[Crypter] Set folder (diff)
downloadpyload-40d188eb6260d6e53154649fce3ae449477cc6bf.tar.xz
save_path and save_join renamed to safe_path and safe_join
Diffstat (limited to 'module/utils.py')
-rw-r--r--module/utils.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/module/utils.py b/module/utils.py
index 5a98b8d4a..94bf78054 100644
--- a/module/utils.py
+++ b/module/utils.py
@@ -39,7 +39,7 @@ def remove_chars(string, repl):
return string.translate(dict([(ord(s), None) for s in repl]))
-def save_path(name):
+def safe_path(name):
#remove some chars
name = name.encode('ascii', 'replace') # Non-ASCII chars usually breaks file saving. Replacing.
if os.name == 'nt':
@@ -49,7 +49,7 @@ def save_path(name):
return remove_chars(name, u'\0/\\"')
-def save_join(*args):
+def safe_join(*args):
""" joins a path, encoding aware """
return fs_encode(join(*[x if type(x) == unicode else decode(x) for x in args]))