Fix a bug that in some rare cases may lead to a patch not being properly
generated.
This commit is contained in:
@@ -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 == '':
|
||||
|
||||
Reference in New Issue
Block a user