Move case correction to after self==other check.

This commit is contained in:
Ethan Dalool 2019-08-01 08:47:04 -07:00
parent e478aca497
commit b8aaecd15f

View file

@ -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)