Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Closed
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 1 addition & 6 deletions Lib/posixpath.py
Original file line number Diff line number Diff line change
Expand Up @@ -202,12 +202,7 @@ def ismount(path):
if stat.S_ISLNK(s1.st_mode):
return False

path = os.fspath(path)
if isinstance(path, bytes):
parent = join(path, b'..')
else:
parent = join(path, '..')
parent = realpath(parent)
parent = dirname(abspath(path))
try:
s2 = os.lstat(parent)
except (OSError, ValueError):
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Reduce syscalls for :func:`posixpath.ismount`.
Comment thread
nineteendo marked this conversation as resolved.
Outdated