We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d0b18b1 commit 57daeb2Copy full SHA for 57daeb2
Lib/ntpath.py
@@ -290,9 +290,11 @@ def ismount(path):
290
return True
291
292
if _getvolumepathname:
293
- x = path.rstrip(seps)
294
- y =_getvolumepathname(path).rstrip(seps)
295
- return x.casefold() == y.casefold()
+ try:
+ # The path is a mount point if it's a mounted volume.
+ return path.rstrip(seps).casefold() == _getvolumepathname(path).rstrip(seps).casefold()
296
+ except (OSError, FileNotFoundError):
297
+ return False
298
else:
299
return False
300
0 commit comments