From a2bc5891ae1cee8415df8cb019c9758b5b6cfe15 Mon Sep 17 00:00:00 2001 From: Maxim Sobolev Date: Tue, 31 Jul 2001 07:41:01 +0000 Subject: Fix a bug that in some rare cases may lead to a patch not being properly generated. --- Tools/scripts/patchtool.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'Tools/scripts/patchtool.py') 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 == '': -- cgit v1.2.3