diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2012-05-24 13:57:16 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2012-05-24 14:36:21 +0100 |
commit | 4de24ccc10e40cc088b8515095df59f69b12715d (patch) | |
tree | 6eec98d0dbb18764fdb836285feea3b436f503a7 /lib/bb/utils.py | |
parent | 72fc62ca124a24e2dbe404a3c83a49608a7c7931 (diff) | |
download | bitbake-4de24ccc10e40cc088b8515095df59f69b12715d.tar.gz |
bitbake/utils.py: Ensure utils.which() returns full paths
If the path passed to which contains empty elements, it will search
the current working directory for the file which is correct baheviour.
Various pieces of code assume the path returned is a full path though.
This commit ensures we don't return relative paths.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'lib/bb/utils.py')
-rw-r--r-- | lib/bb/utils.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/bb/utils.py b/lib/bb/utils.py index 7a73419fa..fc389a3e2 100644 --- a/lib/bb/utils.py +++ b/lib/bb/utils.py @@ -721,6 +721,8 @@ def which(path, item, direction = 0): for p in paths: next = os.path.join(p, item) if os.path.exists(next): + if not os.path.isabs(next): + next = os.path.abspath(next) return next return "" |