max path limitation in file installation - Issue 1469

This commit is contained in:
Thomas Nagy 2014-08-04 15:17:28 +02:00
parent bd26b078ca
commit 81ce0b6c17
No known key found for this signature in database
GPG Key ID: 67A565EDFDF90E64
1 changed files with 2 additions and 0 deletions

View File

@ -910,6 +910,8 @@ class InstallContext(BuildContext):
def copy_fun(self, src, tgt, **kw):
# override this if you want to strip executables
# kw['tsk'].source is the task that created the files in the build
if Utils.is_win32 and len(tgt) > 259 and not tgt.startswith('\\\\?\\'):
tgt = '\\\\?\\' + tgt
shutil.copy2(src, tgt)
os.chmod(tgt, kw.get('chmod', Utils.O644))