[Scons-users] Maximum Path Length Limitation of Windows in scons

Sally Arias troy57 at gmail.com
Thu Feb 4 21:08:00 EST 2016


Hi,

I have a very long path name that exceeds windows maximum path length
limitation that is 260. It does not work as it is.

Workaround for Maximum Path Length Limitation:
https://msdn.microsoft.com/en-us/library/windows/desktop/aa365247(v=vs.85).aspx

Adding "\\?\" prefix fixes this issue on python but not on scons.

For example,

os.path.exists(u"\\\\?\\C:\\longpath.....")  and
os.path.listdir(u"\\\\?\\C:\\longdir.....") work.
env.Install(u"\\\\?\\C:\\longpath.....", u"\\\\?\\C:\\longpath.....") does
not work. It does not do anything.

Withou this prefix, scons generates Type Error.
env.Install("C:\\long_path.....", "C:\\long_path.....")
TypeError : listdir() argument 1 must be (buffer overflow), not str

Are there any workarounds for this? Does scons support long path that
exceeds windows maximum path length limitation? I'm using scons 2.2.0.
Should I upgrade scons version?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://pairlist4.pair.net/pipermail/scons-users/attachments/20160204/23292f69/attachment.html>


More information about the Scons-users mailing list