]> granicus.if.org Git - python/commitdiff
Added ismount().
authorJack Jansen <jack.jansen@cwi.nl>
Wed, 15 Jan 2003 22:45:48 +0000 (22:45 +0000)
committerJack Jansen <jack.jansen@cwi.nl>
Wed, 15 Jan 2003 22:45:48 +0000 (22:45 +0000)
Fixes #661762, bugfix candidate.

Lib/macpath.py

index e3145da129533dde33210f871d7103b08a5ce6a0..8cebc087a3df090aa56f68f3e81298fc431adbcf 100644 (file)
@@ -84,6 +84,11 @@ def splitdrive(p):
 def dirname(s): return split(s)[0]
 def basename(s): return split(s)[1]
 
+def ismount(s):
+       if not isabs(s):
+               return False
+       components = split(s)
+       return len(components) == 2 and components[1] == ''
 
 def isdir(s):
     """Return true if the pathname refers to an existing directory."""