aboutsummaryrefslogtreecommitdiffstats
path: root/Tools
diff options
context:
space:
mode:
authorMaxim Sobolev <sobomax@FreeBSD.org>2001-07-31 15:41:01 +0800
committerMaxim Sobolev <sobomax@FreeBSD.org>2001-07-31 15:41:01 +0800
commita2bc5891ae1cee8415df8cb019c9758b5b6cfe15 (patch)
tree82ad14fdcdec85fcf91a08f18574a8a7fb91ea98 /Tools
parentd2911a79af558061d6eaab3572b421e41f61a302 (diff)
downloadfreebsd-ports-a2bc5891ae1cee8415df8cb019c9758b5b6cfe15.tar.gz
freebsd-ports-a2bc5891ae1cee8415df8cb019c9758b5b6cfe15.tar.zst
freebsd-ports-a2bc5891ae1cee8415df8cb019c9758b5b6cfe15.zip
Fix a bug that in some rare cases may lead to a patch not being properly
generated.
Notes
Notes: svn path=/head/; revision=45648
Diffstat (limited to 'Tools')
-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 == '':