summaryrefslogtreecommitdiff
path: root/usr/src/tools/scripts/wsdiff.py
diff options
context:
space:
mode:
authorAndy Fiddaman <omnios@citrus-it.co.uk>2021-02-25 10:19:00 +0000
committerAndy Fiddaman <omnios@citrus-it.co.uk>2021-02-27 00:19:45 +0000
commit7713a0580ffd38602449546f743c4eaccdeff06d (patch)
tree5d38677cd64639006f2a776d9570f620d1c4ea83 /usr/src/tools/scripts/wsdiff.py
parente39a7b5b5afda54edb90e52709591832137db39f (diff)
downloadillumos-joyent-7713a0580ffd38602449546f743c4eaccdeff06d.tar.gz
13582 wsdiff does not like non-proto directories
Reviewed by: Toomas Soome <tsoome@me.com> Reviewed by: Rich Lowe <richlowe@richlowe.net> Approved by: Robert Mustacchi <rm@fingolfin.org>
Diffstat (limited to 'usr/src/tools/scripts/wsdiff.py')
-rw-r--r--usr/src/tools/scripts/wsdiff.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/usr/src/tools/scripts/wsdiff.py b/usr/src/tools/scripts/wsdiff.py
index 259f2005fb..6ca296d3df 100644
--- a/usr/src/tools/scripts/wsdiff.py
+++ b/usr/src/tools/scripts/wsdiff.py
@@ -303,10 +303,12 @@ def str_prefix_trunc(s, prefix) :
def fnFormat(fn) :
global baseWsRoot, ptchWsRoot
- if len(os.path.commonprefix([fn, baseWsRoot])) == len(baseWsRoot):
+ if (baseWsRoot and
+ len(os.path.commonprefix([fn, baseWsRoot])) == len(baseWsRoot)):
return fn[len(baseWsRoot) + 1:]
- if len(os.path.commonprefix([fn, ptchWsRoot])) == len(ptchWsRoot):
+ if (ptchWsRoot and
+ len(os.path.commonprefix([fn, ptchWsRoot])) == len(ptchWsRoot)):
return fn[len(ptchWsRoot) + 1:]
# Fall back to looking for the expected root_<arch>[-nd] string