summaryrefslogtreecommitdiff
path: root/usr/src/tools/scripts/wsdiff.py
diff options
context:
space:
mode:
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