[Python-checkins] r83408 - in python/branches/py3k: Lib/posixpath.py Misc/NEWS

georg.brandl python-checkins at python.org
Sun Aug 1 17:30:56 CEST 2010


Author: georg.brandl
Date: Sun Aug  1 17:30:56 2010
New Revision: 83408

Log:
#5551: symbolic links never can be mount points.  Fixes the fix for #1713.

Modified:
   python/branches/py3k/Lib/posixpath.py
   python/branches/py3k/Misc/NEWS

Modified: python/branches/py3k/Lib/posixpath.py
==============================================================================
--- python/branches/py3k/Lib/posixpath.py	(original)
+++ python/branches/py3k/Lib/posixpath.py	Sun Aug  1 17:30:56 2010
@@ -200,6 +200,9 @@
 
 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):

Modified: python/branches/py3k/Misc/NEWS
==============================================================================
--- python/branches/py3k/Misc/NEWS	(original)
+++ python/branches/py3k/Misc/NEWS	Sun Aug  1 17:30:56 2010
@@ -29,6 +29,9 @@
 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().


More information about the Python-checkins mailing list