From cabaff820674700d4ca1951dc059b51fcf852d48 Mon Sep 17 00:00:00 2001 From: Chris Johns Date: Fri, 13 Apr 2018 13:02:51 +1000 Subject: 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 --- 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 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) -- cgit v1.2.3