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.

classification
Title: Allow os.listdir to accept file names longer than MAX_PATH
Type: Stage:
Components: Interpreter Core Versions:
process
Status: closed Resolution: out of date
Dependencies: Superseder:
Assigned To: Nosy List: rupole
Priority: normal Keywords: patch

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:17adminsetgithub: 43283
2006-04-27 02:19:02rupolecreate