1
0
mirror of https://gitlab.com/openlp/packaging.git synced 2024-12-22 13:02:50 +00:00

Absolute paths

This commit is contained in:
Raoul Snyman 2016-12-05 23:39:17 +02:00
parent 5ce4f143fa
commit 6e6f6ddf2d

View File

@ -46,8 +46,8 @@ def _which(program):
return os.path.isfile(fpath) and os.access(fpath, os.X_OK) return os.path.isfile(fpath) and os.access(fpath, os.X_OK)
fpath, fname = os.path.split(program) fpath, fname = os.path.split(program)
if fpath and is_exe(program): if fpath and is_exe(os.path.abspath(program)):
return program return os.path.abspath(program)
else: else:
for path in os.environ['PATH'].split(os.pathsep): for path in os.environ['PATH'].split(os.pathsep):
path = path.strip('"') path = path.strip('"')