diff options
author | RaNaN <Mast3rRaNaN@hotmail.de> | 2012-12-14 18:43:03 +0100 |
---|---|---|
committer | RaNaN <Mast3rRaNaN@hotmail.de> | 2012-12-14 18:43:03 +0100 |
commit | c36736997b7c0a0e6cc2cbb426f49b486b78a171 (patch) | |
tree | f9588cac0b9f931dfbe733d49eb68ded9f602587 /module/utils | |
parent | merge setup to default (diff) | |
download | pyload-c36736997b7c0a0e6cc2cbb426f49b486b78a171.tar.xz |
cleaned setup
Diffstat (limited to 'module/utils')
-rw-r--r-- | module/utils/fs.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/module/utils/fs.py b/module/utils/fs.py index 1894bc49a..92cc605e7 100644 --- a/module/utils/fs.py +++ b/module/utils/fs.py @@ -26,6 +26,12 @@ def chmod(path, mode): except : pass +def dirname(path): + return fs_decode(os.path.dirname(fs_encode(path))) + +def abspath(path): + return fs_decode(os.path.abspath(fs_encode(path))) + def chown(path, uid, gid): return os.chown(fs_encode(path), uid, gid) @@ -40,7 +46,7 @@ def makedirs(path, mode=0755): # fs_decode? def listdir(path): - return os.listdir(fs_encode(path)) + return [fs_decode(x) for x in os.listdir(fs_encode(path))] def save_filename(name): #remove some chars |