From 81ce0b6c177ed750da95f580245fa43ac40fab6e Mon Sep 17 00:00:00 2001 From: Thomas Nagy Date: Mon, 4 Aug 2014 15:17:28 +0200 Subject: [PATCH] max path limitation in file installation - Issue 1469 --- waflib/Build.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/waflib/Build.py b/waflib/Build.py index 386cc4d5..b55ff5f8 100644 --- a/waflib/Build.py +++ b/waflib/Build.py @@ -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))