diff options
author | RaNaN <Mast3rRaNaN@hotmail.de> | 2013-11-22 23:00:43 +0100 |
---|---|---|
committer | RaNaN <Mast3rRaNaN@hotmail.de> | 2013-11-22 23:00:43 +0100 |
commit | 7a386102e272abf12fc8a03733538421b2711045 (patch) | |
tree | 4d1f1ef511bf3e3b3d95f78d35067885deffc01e /pyload/utils/fs.py | |
parent | fixed and improved last pull request (diff) | |
download | pyload-7a386102e272abf12fc8a03733538421b2711045.tar.xz |
improved addonManager, new property to expose addon information, new functionality to interact with addons
Diffstat (limited to 'pyload/utils/fs.py')
-rw-r--r-- | pyload/utils/fs.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/pyload/utils/fs.py b/pyload/utils/fs.py index 05e098e2a..939adb87c 100644 --- a/pyload/utils/fs.py +++ b/pyload/utils/fs.py @@ -48,7 +48,7 @@ def makedirs(path, mode=0755): def listdir(path): return [fs_decode(x) for x in os.listdir(fs_encode(path))] -def save_filename(name): +def safe_filename(name): #remove some chars if os.name == 'nt': return remove_chars(name, '/\\?%*:|"<>,') @@ -58,10 +58,13 @@ def save_filename(name): def stat(name): return os.stat(fs_encode(name)) -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])) +def save_join(*args): + return safe_join(*args) + def free_space(folder): folder = fs_encode(folder) |