It is now 2-3 times faster if the user has permissions.
parent = join(path, b'..')
else:
parent = join(path, '..')
- parent = realpath(parent)
try:
s2 = os.lstat(parent)
- except (OSError, ValueError):
- return False
+ except OSError:
+ parent = realpath(parent)
+ try:
+ s2 = os.lstat(parent)
+ except OSError:
+ return False
# path/.. on a different device as path or the same i-node as path
return s1.st_dev != s2.st_dev or s1.st_ino == s2.st_ino
--- /dev/null
+:func:`os.path.ismount` is now 2-3 times faster if the user has permissions.