[Python-Dev] [Python-checkins] r84988 - in python/branches/py3k: Lib/ntpath.py Misc/NEWS (original) (raw)

Nick Coghlan ncoghlan at gmail.com
Fri Sep 24 00:30:44 CEST 2010


On Fri, Sep 24, 2010 at 6:38 AM, brian.curtin <python-checkins at python.org> wrote:

Modified: python/branches/py3k/Lib/ntpath.py ============================================================================== --- python/branches/py3k/Lib/ntpath.py  (original) +++ python/branches/py3k/Lib/ntpath.py  Thu Sep 23 22:38:14 2010 @@ -641,24 +641,29 @@

 # determine if two files are in fact the same file +try: +    from nt import getfinalpathname +except (NotImplementedError, ImportError): +    # On Windows XP and earlier, two files are the same if their absolute +    # pathnames are the same. +    # Also, on other operating systems, fake this method with a +    # Windows-XP approximation. +    def getfinalpathname(f): +        return abspath(f)

This only needs to catch ImportError now.

Cheers, Nick.

-- Nick Coghlan   |   ncoghlan at gmail.com   |   Brisbane, Australia



More information about the Python-Dev mailing list