summaryrefslogtreecommitdiffstats
path: root/source-builder/sb/path.py
diff options
context:
space:
mode:
authorChris Johns <chrisj@rtems.org>2017-09-22 11:54:06 +1000
committerChris Johns <chrisj@rtems.org>2017-09-22 12:02:27 +1000
commit55f2d69e9b67cde23d61375fa34ef5b0f04a985d (patch)
tree6d500d9259b7d935fefb5564cc32b3a7f2a3398d /source-builder/sb/path.py
parentsb: Ignore untracked files or detached HEAD in the dirty repo check. (diff)
downloadrtems-source-builder-55f2d69e9b67cde23d61375fa34ef5b0f04a985d.tar.bz2
sb: Allow checking if '.' exists as a path.
Diffstat (limited to 'source-builder/sb/path.py')
-rw-r--r--source-builder/sb/path.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/source-builder/sb/path.py b/source-builder/sb/path.py
index 5f48d26..e3be0ce 100644
--- a/source-builder/sb/path.py
+++ b/source-builder/sb/path.py
@@ -96,7 +96,9 @@ def listdir(path):
def exists(paths):
def _exists(p):
- return os.path.basename(p) in listdir(dirname(p))
+ if '/' not in host(p):
+ p = shell(join(os.getcwd(), host(p)))
+ return basename(p) in ['.'] + listdir(dirname(p))
if type(paths) == list:
results = []