aboutsummaryrefslogtreecommitdiff
path: root/Tools/scripts/patchtool.py
diff options
context:
space:
mode:
authorMaxim Sobolev <sobomax@FreeBSD.org>2001-07-31 07:41:01 +0000
committerMaxim Sobolev <sobomax@FreeBSD.org>2001-07-31 07:41:01 +0000
commita2bc5891ae1cee8415df8cb019c9758b5b6cfe15 (patch)
tree82ad14fdcdec85fcf91a08f18574a8a7fb91ea98 /Tools/scripts/patchtool.py
parentd2911a79af558061d6eaab3572b421e41f61a302 (diff)
downloadports-a2bc5891ae1cee8415df8cb019c9758b5b6cfe15.tar.gz
ports-a2bc5891ae1cee8415df8cb019c9758b5b6cfe15.zip
Notes
Diffstat (limited to 'Tools/scripts/patchtool.py')
-rwxr-xr-xTools/scripts/patchtool.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/Tools/scripts/patchtool.py b/Tools/scripts/patchtool.py
index 08f8f528851d..845a7ff92c6c 100755
--- a/Tools/scripts/patchtool.py
+++ b/Tools/scripts/patchtool.py
@@ -157,6 +157,8 @@ def getrelpath(path, wrksrc):
path = os.path.abspath(path)
wrksrc = os.path.abspath(wrksrc)
commonpart = os.path.commonprefix((path, wrksrc))
+ while commonpart[-1:] != '/':
+ commonpart = commonpart[:-1]
path = path[len(commonpart):]
wrksrc = wrksrc[len(commonpart):]
if wrksrc == '':