[rtems-source-builder commit] sb: Allow checking if '.' exists as a path.

Chris Johns chrisj at rtems.org
Fri Sep 22 02:52:15 UTC 2017


Module:    rtems-source-builder
Branch:    master
Commit:    55f2d69e9b67cde23d61375fa34ef5b0f04a985d
Changeset: http://git.rtems.org/rtems-source-builder/commit/?id=55f2d69e9b67cde23d61375fa34ef5b0f04a985d

Author:    Chris Johns <chrisj at rtems.org>
Date:      Fri Sep 22 11:54:06 2017 +1000

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 = []



More information about the vc mailing list