[Python-checkins] CVS: python/dist/src/Lib ntpath.py,1.27,1.28

Mark Hammond python-dev@python.org
Sun, 13 Aug 2000 23:20:35 -0700


Update of /cvsroot/python/python/dist/src/Lib
In directory slayer.i.sourceforge.net:/tmp/cvs-serv12847

Modified Files:
	ntpath.py 
Log Message:
Fix for Bug #110673: os.abspatth() now always returns os.getcwd() on Windows, if an empty path is specified.  It previously did not if an empty path was delegated to win32api.GetFullPathName())

Index: ntpath.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/ntpath.py,v
retrieving revision 1.27
retrieving revision 1.28
diff -C2 -r1.27 -r1.28
*** ntpath.py	2000/07/17 03:06:58	1.27
--- ntpath.py	2000/08/14 06:20:32	1.28
***************
*** 417,423 ****
          abspath = _abspath
          return _abspath(path)
!     try:
!         path = win32api.GetFullPathName(path)
!     except win32api.error:
!         pass # Bad path - return unchanged.
      return normpath(path)
--- 417,426 ----
          abspath = _abspath
          return _abspath(path)
!     if path: # Empty path must return current working directory.
!         try:
!             path = win32api.GetFullPathName(path)
!         except win32api.error:
!             pass # Bad path - return unchanged.
!     else:
!         path = os.getcwd()
      return normpath(path)