Issue 1477350: Allow os.listdir to accept file names longer than MAX_PATH (original) (raw)

Issue1477350

Created on 2006-04-27 02:19 by rupole, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
posixmodule.patch rupole,2006-04-27 02:19
listdir_longpath.py rupole,2006-04-27 03:38
Messages (3)
msg50116 - (view) Author: Roger Upole (rupole) Date: 2006-04-27 02:19
On windows, os.listdir currently truncates paths longer than MAX_PATH due to using a fixed-size buffer. Patch allocates a buffer of needed size. It also replaces the forward slash appended to the path with a backslash since forward slashes don't work when using a raw path. There was also a potential crash if FindClose failed. Diff'ed against 2.4.3.
msg50117 - (view) Author: Roger Upole (rupole) Date: 2006-04-27 03:38
Logged In: YES user_id=771074 Attaching a test script
msg50118 - (view) Author: Roger Upole (rupole) Date: 2006-08-28 03:44
Logged In: YES user_id=771074 Wheel subsequently reinvented
History
Date User Action Args
2022-04-11 14:56:17 admin set github: 43283
2006-04-27 02:19:02 rupole create