git.cweiske.de
/
enigma2.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
10c6065
)
support path_prefix
author
Felix Domke
<tmbinc@elitedvb.net>
Thu, 15 Jun 2006 17:35:05 +0000
(17:35 +0000)
committer
Felix Domke
<tmbinc@elitedvb.net>
Thu, 15 Jun 2006 17:35:05 +0000
(17:35 +0000)
lib/python/Tools/Directories.py
patch
|
blob
|
history
diff --git
a/lib/python/Tools/Directories.py
b/lib/python/Tools/Directories.py
index 320490723bda8619ce1647ef830d77af6f580da4..7c50bd9fa2d2ed41828e2fb59b6555787ea0416d 100644
(file)
--- a/
lib/python/Tools/Directories.py
+++ b/
lib/python/Tools/Directories.py
@@
-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 = path_prefix + base[2:]
# don't resolve absolute paths
- if
len(base) and base[0
] == '/':
+ if
base[0:1
] == '/':
return base
path = defaultPaths[scope]