aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorAndreas Frisch <andreas.frisch@multimedia-labs.de>2008-09-04 07:53:52 +0000
committerAndreas Frisch <andreas.frisch@multimedia-labs.de>2008-09-04 07:53:52 +0000
commit3febddec12dfe05fea5f388274a991f8faecab48 (patch)
tree37202cf6b2c6e3dc7b7c7e1e1010401c91b01436 /lib
parent5d17d6c6fdcb54f655825716084fb4bea871f50f (diff)
downloadenigma2-3febddec12dfe05fea5f388274a991f8faecab48.tar.gz
enigma2-3febddec12dfe05fea5f388274a991f8faecab48.zip
allow recursive (-p) directory creation
Diffstat (limited to 'lib')
-rw-r--r--lib/python/Tools/Directories.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/python/Tools/Directories.py b/lib/python/Tools/Directories.py
index 576d2773..8a35f1da 100644
--- a/lib/python/Tools/Directories.py
+++ b/lib/python/Tools/Directories.py
@@ -126,9 +126,12 @@ def resolveFilename(scope, base = "", path_prefix = None):
def pathExists(path):
return os_path.exists(path)
-def createDir(path):
+def createDir(path, makeParents = False):
try:
- mkdir(path)
+ if makeParents:
+ makedirs(path)
+ else:
+ mkdir(path)
except:
ret = 0
else: