Skip to content

Commit

Permalink
Fix #169 - Files with very long paths fail to extract on Windows
Browse files Browse the repository at this point in the history
- Use robocopy instead of xcopy, alter to smooth out exit codes of 0-3 to become 0

Signed-off-by: Christopher Williams <[email protected]>
  • Loading branch information
sgtcoolguy committed Nov 18, 2016
1 parent e8fdfb1 commit 9d0abe3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libraries/sevenzip_command_builder.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 9d0abe3

Please sign in to comment.