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.
(Bitbake rev:
4de24ccc10e40cc088b8515095df59f69b12715d)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
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 ""