[rtems-source-builder commit] sb/path: Walk up to root checking if a path is writable.
Chris Johns
chrisj at rtems.org
Fri Apr 13 03:11:33 UTC 2018
Module: rtems-source-builder
Branch: 4.11
Commit: 2c0676d4fa4b773369431fdc57a62333346876ea
Changeset: http://git.rtems.org/rtems-source-builder/commit/?id=2c0676d4fa4b773369431fdc57a62333346876ea
Author: Chris Johns <chrisj at rtems.org>
Date: Fri Apr 13 13:02:51 2018 +1000
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 #3393
---
source-builder/sb/path.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/source-builder/sb/path.py b/source-builder/sb/path.py
index 679436c..b86df0d 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)
More information about the vc
mailing list