This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author pitrou
Recipients amaury.forgeotdarc, brian.curtin, pitrou, tim.golden
Date 2012-01-11.20:01:13
SpamBayes Score 0.00016507646
Marked as misclassified No
Message-id <1326312074.88.0.322514160628.issue13772@psf.upfronthosting.co.za>
In-reply-to
Content
Note how _getfinalpathname works and calling listdir on the final path name also works:

>>> os.symlink(".\\test", "Lib\\bar")
>>> os.listdir("Lib\\bar")[:4]
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
NotADirectoryError: [Error 267] The directory name is invalid: 'Lib\\bar\\*.*'

>>> nt._getfinalpathname("Lib\\bar")
'\\\\?\\C:\\t\\pathlib\\Lib\\test'
>>> os.listdir(nt._getfinalpathname("Lib\\bar"))[:4]
['185test.db', 'audiotest.au', 'autotest.py', 'badcert.pem']

Calling listdir on the non-final extended path doesn't work:

>>> os.listdir('\\\\?\\C:\\t\\pathlib\\Lib\\bar')[:4]
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
NotADirectoryError: [Error 267] The directory name is invalid: '\\\\?\\C:\\t\\pa
thlib\\Lib\\bar\\*.*'

But open() works:

>>> open('Lib\\bar\\regrtest.py')
<_io.TextIOWrapper name='Lib\\bar\\regrtest.py' mode='r' encoding='cp1252'>
History
Date User Action Args
2012-01-11 20:01:15pitrousetrecipients: + pitrou, amaury.forgeotdarc, tim.golden, brian.curtin
2012-01-11 20:01:14pitrousetmessageid: <1326312074.88.0.322514160628.issue13772@psf.upfronthosting.co.za>
2012-01-11 20:01:14pitroulinkissue13772 messages
2012-01-11 20:01:13pitroucreate