mirror of
https://git.freebsd.org/ports.git
synced 2025-07-18 09:49:18 -04:00
Fix a bug that in some rare cases may lead to a patch not being properly
generated.
This commit is contained in:
parent
d2911a79af
commit
a2bc5891ae
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=45648
1 changed files with 2 additions and 0 deletions
|
@ -157,6 +157,8 @@ def getrelpath(path, wrksrc):
|
||||||
path = os.path.abspath(path)
|
path = os.path.abspath(path)
|
||||||
wrksrc = os.path.abspath(wrksrc)
|
wrksrc = os.path.abspath(wrksrc)
|
||||||
commonpart = os.path.commonprefix((path, wrksrc))
|
commonpart = os.path.commonprefix((path, wrksrc))
|
||||||
|
while commonpart[-1:] != '/':
|
||||||
|
commonpart = commonpart[:-1]
|
||||||
path = path[len(commonpart):]
|
path = path[len(commonpart):]
|
||||||
wrksrc = wrksrc[len(commonpart):]
|
wrksrc = wrksrc[len(commonpart):]
|
||||||
if wrksrc == '':
|
if wrksrc == '':
|
||||||
|
|
Loading…
Add table
Reference in a new issue