bpo-39897: Remove needless `Path(self.parent)` call, which makes `is_mount()` misbehave in `Path` subclasses. (GH-18839)
This commit is contained in:
parent
75a3378810
commit
c746c4f353
|
@ -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):
|
||||
|
|
Loading…
Reference in New Issue