forked from Lainports/freebsd-ports
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
1 changed files with 2 additions and 0 deletions
|
|
@ -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 == '':
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue