- if path[1] == PATH_CREATE:
- if (not pathExists(defaultPaths[scope][0])):
- os.mkdir(path[0])
-
- if not fileExists(path[0] + base):
+ # don't resolve absolute paths
+ if base[0:1] == '/':
+ return base
+
+ if scope == SCOPE_CURRENT_SKIN:
+ from Components.config import config
+ tmp = defaultPaths[SCOPE_SKIN]
+ pos = config.skin.primary_skin.value.rfind('/')
+ if pos != -1:
+ path = tmp[0]+config.skin.primary_skin.value[:pos+1]
+ else:
+ path = tmp[0]
+ else:
+ tmp = defaultPaths[scope]
+ path = tmp[0]
+
+ flags = tmp[1]
+
+ if flags == PATH_CREATE:
+ if (not pathExists(path)):
+ mkdir(path)
+
+ #if len(base) > 0 and base[0] == '/':
+ #path = ("", None)
+
+ if not fileExists(path + base):