Skip to content

Commit

Permalink
Fix sous-chefs#169 - Files with very long paths fail to extract on Wi…
Browse files Browse the repository at this point in the history
…ndows

- Use robocopy instead of xcopy, alter to smooth out exit codes of 0-3 to become 0
  • Loading branch information
sgtcoolguy committed Nov 18, 2016
1 parent e8fdfb1 commit ceebabe
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 ceebabe

Please sign in to comment.