Move case correction to after self==other check.

master
Ethan Dalool 2019-08-01 08:47:04 -07:00
parent e478aca497
commit b8aaecd15f
1 changed files with 3 additions and 2 deletions

View File

@ -122,12 +122,13 @@ class Path:
def relative_to(self, other): def relative_to(self, other):
other = Path(other) other = Path(other)
other.correct_case()
self.correct_case()
if self == other: if self == other:
return '.' return '.'
self.correct_case()
other.correct_case()
if self in other: if self in other:
relative = self.absolute_path relative = self.absolute_path
relative = relative.replace(other.absolute_path, '', 1) relative = relative.replace(other.absolute_path, '', 1)