Skip to content

Commit e49c158

Browse files
committed
Update ismount() to return False for non-existent drive roots
1 parent 57daeb2 commit e49c158

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Lib/ntpath.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,8 @@ def ismount(path):
287287
if drive and drive[0] in seps:
288288
return not rest
289289
if root and not rest:
290-
return True
290+
# Drive root is a mount point if it exists.
291+
return exists(path)
291292

292293
if _getvolumepathname:
293294
try:

0 commit comments

Comments
 (0)