From 55f2d69e9b67cde23d61375fa34ef5b0f04a985d Mon Sep 17 00:00:00 2001 From: Chris Johns Date: Fri, 22 Sep 2017 11:54:06 +1000 Subject: sb: Allow checking if '.' exists as a path. --- source-builder/sb/path.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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 = [] -- cgit v1.2.3