Move case correction to after self==other check.
This commit is contained in:
parent
e478aca497
commit
b8aaecd15f
1 changed files with 3 additions and 2 deletions
|
@ -122,12 +122,13 @@ class Path:
|
|||
|
||||
def relative_to(self, other):
|
||||
other = Path(other)
|
||||
other.correct_case()
|
||||
self.correct_case()
|
||||
|
||||
if self == other:
|
||||
return '.'
|
||||
|
||||
self.correct_case()
|
||||
other.correct_case()
|
||||
|
||||
if self in other:
|
||||
relative = self.absolute_path
|
||||
relative = relative.replace(other.absolute_path, '', 1)
|
||||
|
|
Loading…
Reference in a new issue