From: Neal Norwitz Date: Sun, 2 Feb 2003 19:23:13 +0000 (+0000) Subject: Backport: X-Git-Tag: v2.2.3c1~159 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=a21ddb72cd77b74cdaff42c4a32a8b6991aa84de;p=thirdparty%2FPython%2Fcpython.git Backport: revision 1.44 date: 2003/01/15 22:45:48; author: jackjansen; state: Exp; lines: +5 -0 Added ismount(). Fixes #661762, bugfix candidate. --- diff --git a/Lib/macpath.py b/Lib/macpath.py index 88caf82cbf5a..f098310b2af9 100644 --- a/Lib/macpath.py +++ b/Lib/macpath.py @@ -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."""