diff options
-rw-r--r-- | Lib/pathlib.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/Lib/pathlib.py b/Lib/pathlib.py index d2053e6..d3e89df 100644 --- a/Lib/pathlib.py +++ b/Lib/pathlib.py @@ -1438,9 +1438,8 @@ class Path(PurePath): if not self.exists() or not self.is_dir(): return False - parent = Path(self.parent) try: - parent_dev = parent.stat().st_dev + parent_dev = self.parent.stat().st_dev except OSError: return False @@ -1448,7 +1447,7 @@ class Path(PurePath): if dev != parent_dev: return True ino = self.stat().st_ino - parent_ino = parent.stat().st_ino + parent_ino = self.parent.stat().st_ino return ino == parent_ino def is_symlink(self): |