[py-dev] MAX_PATH on windows
Martijn Faassen
faassen at startifact.com
Tue May 6 16:34:45 CEST 2008
Hi there,
Apparently the Windows API has a limitation in how long paths can get,
set to 256 characters!(!!)
This can break applications on Windows, including Py.
Here are some relevant resources:
http://mail.python.org/pipermail/python-bugs-list/2006-June/033754.html
http://mail.python.org/pipermail/python-bugs-list/2007-March/037810.html
http://msdn.microsoft.com/en-us/library/aa365247.aspx
There is some discussion that this could be fixed in Python 2.5. It's
also however not 100% clear to me, looking at the discussions, whether
it really is. I'm on Python 2.4 myself... I think at the very least it'd
be good to have a test case in Py that tries to trigger this error.
Apparently a workaround is to prefix windows paths by "\\?\". Paths can
then be a lot longer. I'm not sure how this interacts with the Python
use of these APIs, however. If the workaround would really work, py
could generate its windows paths with that prefix.
Regards,
Martijn
More information about the py-dev
mailing list