Message151087
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'> |
|
Date |
User |
Action |
Args |
2012-01-11 20:01:15 | pitrou | set | recipients:
+ pitrou, amaury.forgeotdarc, tim.golden, brian.curtin |
2012-01-11 20:01:14 | pitrou | set | messageid: <1326312074.88.0.322514160628.issue13772@psf.upfronthosting.co.za> |
2012-01-11 20:01:14 | pitrou | link | issue13772 messages |
2012-01-11 20:01:13 | pitrou | create | |
|