mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
Fix to ismount(). Can't remember who told me this.
This commit is contained in:
parent
29c4688659
commit
ca99c2ce75
1 changed files with 3 additions and 2 deletions
|
@ -223,8 +223,9 @@ def samestat(s1, s2):
|
||||||
# XXX This degenerates in: 'is this the root?' on DOS
|
# XXX This degenerates in: 'is this the root?' on DOS
|
||||||
|
|
||||||
def ismount(path):
|
def ismount(path):
|
||||||
"""Test whether a path is a mount point"""
|
"""Test whether a path is a mount point (defined as root of drive)"""
|
||||||
return isabs(splitdrive(path)[1])
|
p = splitdrive(path)[1]
|
||||||
|
return len(p)==1 and p[0] in '/\\'
|
||||||
|
|
||||||
|
|
||||||
# Directory tree walk.
|
# Directory tree walk.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue