small fix for basenames of zero length
[enigma2.git] / lib / python / Tools / Directories.py
index 6c84216fe25bbe86c080d7a295232e340211f6ec..6b321c3299c7689096622aa4cb9ba440aa2af048 100644 (file)
@@ -47,7 +47,7 @@ def resolveFilename(scope, base = ""):
                if (not pathExists(defaultPaths[scope][0])):
                        os.mkdir(path[0])
                        
-       if base[0] == '/':
+       if len(base > 0) and base[0] == '/':
                path = ""
        
        if not fileExists(path[0] + base):