Commit ca99c2ce authored by Guido van Rossum's avatar Guido van Rossum

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

parent 29c46886
...@@ -223,8 +223,9 @@ def samestat(s1, s2): ...@@ -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.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment