]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Backport:
authorNeal Norwitz <nnorwitz@gmail.com>
Sun, 2 Feb 2003 19:23:13 +0000 (19:23 +0000)
committerNeal Norwitz <nnorwitz@gmail.com>
Sun, 2 Feb 2003 19:23:13 +0000 (19:23 +0000)
revision 1.44
date: 2003/01/15 22:45:48;  author: jackjansen;  state: Exp;  lines: +5 -0
Added ismount().

Fixes #661762, bugfix candidate.

Lib/macpath.py

index 88caf82cbf5add491ebe3789eab35a2bb0e2ca6c..f098310b2af93608d2178b9478a4b913a0f0bad8 100644 (file)
@@ -93,6 +93,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."""