Fix search path for relative paths in roles (fixes #17877)

(cherry picked from commit 72f0aaf606)
(cherry picked from commit ef3fa115d3ba319b7f6a7a86a85655d9cf766120)
pull/18119/head
Andrew Gaffney 9 years ago committed by Brian Coca
parent 9a9f767857
commit 7ee14f466e

@ -313,7 +313,11 @@ class DataLoader():
search.append(os.path.join(os.path.dirname(b_mydir), b_dirname, b_source))
search.append(os.path.join(b_mydir, b_source))
else:
search.append(os.path.join(b_upath, b_dirname, b_source))
# don't add dirname if user already is using it in source
if b_source.split(b'/')[0] == b_dirname:
search.append(os.path.join(b_upath, b_source))
else:
search.append(os.path.join(b_upath, b_dirname, b_source))
search.append(os.path.join(b_upath, b'tasks', b_source))
elif b_dirname not in b_source.split(b'/'):
# don't add dirname if user already is using it in source

Loading…
Cancel
Save