From f04af77306ae244df18dc1241658c30159cf927c Mon Sep 17 00:00:00 2001 From: Patrick Stewart Date: Wed, 2 Oct 2019 15:40:06 +0100 Subject: [PATCH] Normalise path before comparing on windows, as it may contain mixed back/forward slashes --- py/_path/local.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/py/_path/local.py b/py/_path/local.py index 0e856a66..f72504ee 100644 --- a/py/_path/local.py +++ b/py/_path/local.py @@ -166,9 +166,9 @@ def __hash__(self): return hash(self.strpath) def __eq__(self, other): - s1 = fspath(self) + s1 = normpath(fspath(self)) try: - s2 = fspath(other) + s2 = normpath(fspath(other)) except TypeError: return False if iswin32: