]> granicus.if.org Git - python/commitdiff
Fix to ismount(). Can't remember who told me this.
authorGuido van Rossum <guido@python.org>
Mon, 19 Jan 1998 22:25:59 +0000 (22:25 +0000)
committerGuido van Rossum <guido@python.org>
Mon, 19 Jan 1998 22:25:59 +0000 (22:25 +0000)
Lib/ntpath.py

index 0d7ef659165109704c9b10540ee74f1115a3df35..324ff2e3ec27b57799561f091123deb7169a4f89 100644 (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.