From: Georg Brandl Date: Sun, 1 Aug 2010 15:30:56 +0000 (+0000) Subject: #5551: symbolic links never can be mount points. Fixes the fix for #1713. X-Git-Tag: v3.2a2~562 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=e6c5950af0337f6d991f98d8b93b24825334e270;p=thirdparty%2FPython%2Fcpython.git #5551: symbolic links never can be mount points. Fixes the fix for #1713. --- diff --git a/Lib/posixpath.py b/Lib/posixpath.py index 667f5c52de2e..e9f4251846cf 100644 --- a/Lib/posixpath.py +++ b/Lib/posixpath.py @@ -200,6 +200,9 @@ def samestat(s1, s2): def ismount(path): """Test whether a path is a mount point""" + if islink(path): + # A symlink can never be a mount point + return False try: s1 = os.lstat(path) if isinstance(path, bytes): diff --git a/Misc/NEWS b/Misc/NEWS index 0fa78458f52b..94bf2b9de072 100644 --- a/Misc/NEWS +++ b/Misc/NEWS @@ -29,6 +29,9 @@ Extensions Library ------- +- Issue #1713: Fix os.path.ismount(), which returned true for symbolic links + across devices. + - Issue #8826: Properly load old-style "expires" attribute in http.cookies. - Issue #1690103: Fix initial namespace for code run with trace.main().