Fix to ismount(). Can't remember who told me this.

This commit is contained in:
Guido van Rossum 1998-01-19 22:25:59 +00:00
parent 29c4688659
commit ca99c2ce75
1 changed files with 3 additions and 2 deletions

View File

@ -223,8 +223,9 @@ def samestat(s1, s2):
# XXX This degenerates in: 'is this the root?' on DOS
def ismount(path):
"""Test whether a path is a mount point"""
return isabs(splitdrive(path)[1])
"""Test whether a path is a mount point (defined as root of drive)"""
p = splitdrive(path)[1]
return len(p)==1 and p[0] in '/\\'
# Directory tree walk.