From ceebabee1e2d226063f94977698e152a191e95bf Mon Sep 17 00:00:00 2001 From: Christopher Williams Date: Fri, 18 Nov 2016 10:31:39 -0500 Subject: [PATCH] Fix #169 - Files with very long paths fail to extract on Windows - Use robocopy instead of xcopy, alter to smooth out exit codes of 0-3 to become 0 --- libraries/sevenzip_command_builder.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/sevenzip_command_builder.rb b/libraries/sevenzip_command_builder.rb index 8d8a9934..26fd4bc8 100644 --- a/libraries/sevenzip_command_builder.rb +++ b/libraries/sevenzip_command_builder.rb @@ -40,7 +40,7 @@ def sevenzip_command currdir += "\\%#{count}" end - cmd += "#{ENV.fetch('SystemRoot')}\\System32\\xcopy \"#{currdir}\" \"#{resource.home_dir}\" /s /e" + cmd += "(#{ENV.fetch('SystemRoot')}\\System32\\robocopy \"#{currdir}\" \"#{resource.home_dir}\" /s /e) ^& IF %ERRORLEVEL% LEQ 3 cmd /c exit 0" end def sevenzip_binary