state.relpath: correct broken paths ending with /, etc.
Bug reported by Elliott Hird. Based on a patch by Tim Allen, but I didn't do it the same way.
This commit is contained in:
parent
49228ce01c
commit
705722d612
1 changed files with 1 additions and 0 deletions
1
state.py
1
state.py
|
|
@ -120,6 +120,7 @@ def relpath(t, base):
|
|||
if not _cwd:
|
||||
_cwd = os.getcwd()
|
||||
t = os.path.normpath(os.path.join(_cwd, t))
|
||||
base = os.path.normpath(base)
|
||||
tparts = t.split('/')
|
||||
bparts = base.split('/')
|
||||
for tp,bp in zip(tparts,bparts):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue