[Python-bugs-list] [Bug #110673] os.abspatth() error due to win32api.GetFullPathName (PR#380)

noreply@sourceforge.net noreply@sourceforge.net
Sun, 13 Aug 2000 23:22:10 -0700


Bug #110673, was updated on 2000-Jul-31 14:12
Here is a current snapshot of the bug.

Project: Python
Category: Windows
Status: Open
Resolution: Fixed
Bug Group: Platform-specific
Priority: 5
Summary: os.abspatth() error due to win32api.GetFullPathName (PR#380)

Details: Jitterbug-Id: 380
Submitted-By: 2jerry@writeme.com
Date: Mon,  3 Jul 2000 17:14:02 -0400 (EDT)
Version: 1.5.2  (win32api build 129)
OS: pc win98


next to code:
full_path_lst = map(os.path.abspath, sys.path)

according to that sys.path include the source directory at the first place of
sys.path.

I noticed that if I call the module in its own directory (python -i module.py)
 the first item of sys.path is ''.
That all ok: abspath function in os module call getcwd() function if path is
Null.
... 
good day for UNIX like men (as me :))
...
but in NT or WIN 98 workstation:
os.path.abspath call :win32api.GetFullPathName(path)  in ntpath module 
and 
win32api.GetFullPathName('')   return '' and not current directory.

Maybe is it a functionality .. but is os-depend functionality available for a
longtime ?

Jerome.vacher alias Jerry the foolish dracomorpheus.





====================================================================
Audit trail:
Tue Jul 11 08:24:22 2000	guido	moved from incoming to open

Follow-Ups:

Date: 2000-Aug-01 14:01
By: none

Comment:
From: "Mark Hammond" <mhammond@skippinet.com.au>
Subject: RE: [Python-bugs-list] win32api.GetFullPathName (build 129) (PR#380)
Date: Tue, 4 Jul 2000 16:19:30 +1000

Can anyone else here confirm that:

a) os.abspath('') on Linux does indeed return the CWD.
b) It is supposed to :-)

If confirmed, this would be a bug in ntpath.py.  It catches win32api
exceptions, and returns the input name in that case.  This would be
triggered by:

>>> win32api.GetFullPathName('')
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
pywintypes.api_error: (127, 'GetFullPathName', 'The specified procedure
could not be found.')

Is this indeed something we should fix?

Mark.

> -----Original Message-----
> From: python-bugs-list-admin@python.org
> [mailto:python-bugs-list-admin@python.org]On Behalf Of
> 2jerry@writeme.com
> Sent: Tuesday, 4 July 2000 7:14 AM
> To: python-bugs-list@python.org
> Cc: bugs-py@python.org
> Subject: [Python-bugs-list] win32api.GetFullPathName (build 129)
> (PR#380)
>
>
> Full_Name: Jerome VACHER
> Version: 1.5.2  (win32api build 129)
> OS: pc win98
> Submission from: ppp-55.dialup-166.worldonline.fr (212.83.166.55)
>
>
> next to code:
> full_path_lst = map(os.path.abspath, sys.path)
>
> according to that sys.path include the source directory at the
> first place of
> sys.path.
>
> I noticed that if I call the module in its own directory (python
> -i module.py)
>  the first item of sys.path is ''.
> That all ok: abspath function in os module call getcwd()
> function if path is
> Null.
> ...
> good day for UNIX like men (as me :))
> ...
> but in NT or WIN 98 workstation:
> os.path.abspath call :win32api.GetFullPathName(path)  in ntpath module
> and
> win32api.GetFullPathName('')   return '' and not current directory.
>
> Maybe is it a functionality .. but is os-depend functionality
> available for a
> longtime ?
>
> Jerome.vacher alias Jerry the foolish dracomorpheus.
>
>
>
>
>
> _______________________________________________
> Python-bugs-list maillist  -  Python-bugs-list@python.org
> http://www.python.org/mailman/listinfo/python-bugs-list



-------------------------------------------------------

Date: 2000-Aug-01 14:01
By: none

Comment:
From: "Fred L. Drake, Jr." <fdrake@beopen.com>
Subject: RE: [Python-bugs-list] win32api.GetFullPathName (build 129) (PR#380)
Date: Tue, 4 Jul 2000 13:34:24 -0400 (EDT)


Mark Hammond writes:
 > Can anyone else here confirm that:
 > 
 > a) os.abspath('') on Linux does indeed return the CWD.

  Yes, that's right.

 > b) It is supposed to :-)

  I think that's the right thing to do.


  -Fred

-- 
Fred L. Drake, Jr.  <fdrake at beopen.com>
BeOpen PythonLabs Team Member



-------------------------------------------------------

Date: 2000-Aug-06 13:56
By: twouters

Comment:
Possibly already fixed, or at least Mark has looked at it :) 

-------------------------------------------------------

Date: 2000-Aug-06 15:55
By: mhammond

Comment:
This is not a bug in win32api.GetFullPathName(), but rather the use of GetFullPathName() to implement os.abspath().  Bug summary changed accordingly.  Confirmed as a bug, and I will fix it!
-------------------------------------------------------

Date: 2000-Aug-13 23:22
By: mhammond

Comment:
ntpath.py and test_ntpath.py checked in with the fix!
-------------------------------------------------------

For detailed info, follow this link:
http://sourceforge.net/bugs/?func=detailbug&bug_id=110673&group_id=5470