summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Johns <chrisj@rtems.org>2018-04-13 13:02:51 +1000
committerChris Johns <chrisj@rtems.org>2018-04-13 13:02:51 +1000
commitcabaff820674700d4ca1951dc059b51fcf852d48 (patch)
treebfabc094378a91fe7d7c2bc3db7baf0234d94178
parentsb/config: Terminate building on an error. (diff)
downloadrtems-source-builder-cabaff820674700d4ca1951dc059b51fcf852d48.tar.bz2
sb/path: Walk up to root checking if a path is writable.
A dirname of / is / so the path will never have a length of 0. Close #3392
-rw-r--r--source-builder/sb/path.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/source-builder/sb/path.py b/source-builder/sb/path.py
index f851139..e2fd3d4 100644
--- a/source-builder/sb/path.py
+++ b/source-builder/sb/path.py
@@ -143,7 +143,7 @@ def iswritable(path):
def ispathwritable(path):
path = shell(path)
- while len(path) != 0:
+ while len(path) > 1:
if exists(path):
return iswritable(path)
path = dirname(path)