From c36736997b7c0a0e6cc2cbb426f49b486b78a171 Mon Sep 17 00:00:00 2001 From: RaNaN Date: Fri, 14 Dec 2012 18:43:03 +0100 Subject: cleaned setup --- module/utils/fs.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'module/utils/fs.py') 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 -- cgit v1.2.3