Message408621
It works as expected for me:
>>> len(p)
261
>>> print(p)
C:\Temp\Jim\Documents\jschw_uiowtv3_old\AppData\Local\Google\Chrome\User Data\Default\Extensions\nenlahapcbofgnanklpelkaejcehkggg\0.1.823.675_0\notifications\pages\Cashback\components\CashBackResolve\components\RewardsActivation\components\CashbackSectionSimple
os.walk() can list the files in directory `p` if the \\?\ prefix is prepended:
>>> next(os.walk('\\\\?\\' + p))[-1]
['spam.txt']
Without the prefix, the internal os.scandir() call fails, but by default the error is ignored:
>>> next(os.walk(p))[-1]
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
StopIteration
We can print the exception to see that it's the expected ERROR_PATH_NOT_FOUND (3) error for a path that's too long:
>>> next(os.walk(p, onerror=print))[-1]
[WinError 3] The system cannot find the path specified: 'C:\\Temp\\Jim\\Documents\\jschw_uiowtv3_old\\AppData\\Local\\Google\\Chrome\\User Data\\Default\\Extensions\\nenlahapcbofgnanklpelkaejcehkggg\\0.1.823.675_0\\notifications\\pages\\Cashback\\components\\CashBackResolve\\components\\RewardsActivation\\components\\CashbackSectionSimple'
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
StopIteration |
|
Date |
User |
Action |
Args |
2021-12-15 17:32:36 | eryksun | set | recipients:
+ eryksun, paul.moore, tim.golden, zach.ware, steve.dower, jschwar313 |
2021-12-15 17:32:36 | eryksun | set | messageid: <1639589556.28.0.171383827114.issue46084@roundup.psfhosted.org> |
2021-12-15 17:32:36 | eryksun | link | issue46084 messages |
2021-12-15 17:32:36 | eryksun | create | |
|