check if screen has already been built
[enigma2.git] / lib / python / Tools / Directories.py
index 320490723bda8619ce1647ef830d77af6f580da4..f7be95359be7b26302269abfd44389de3183994c 100644 (file)
@@ -42,10 +42,14 @@ fallbackPaths = {
                SCOPE_HDD: [("/hdd/movies", PATH_MOVE)]
        }
 
-def resolveFilename(scope, base = ""):
+def resolveFilename(scope, base = "", path_prefix = None):
+       if base[0:2] == "~/":
+               # you can only use the ~/ if we have a prefix directory
+               assert path_prefix is not None
+               base = os.path.join(path_prefix, base[2:])
 
        # don't resolve absolute paths
-       if len(base) and base[0] == '/':
+       if base[0:1] == '/':
                return base
 
        path = defaultPaths[scope]