Skip to content

Commit

Permalink
Fix 7-zip extraction with long paths when strip_components is >= 1
Browse files Browse the repository at this point in the history
Signed-off-by: Christopher Williams <[email protected]>
  • Loading branch information
sgtcoolguy committed Nov 18, 2016
1 parent 9d0abe3 commit 7552305
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions libraries/sevenzip_command_builder.rb
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,11 @@ def sevenzip_command
return sevenzip_command_builder(resource.path, 'x')
end

tmpdir = make_temp_directory
tmpdir = make_temp_directory.tr('/', '\\')
cmd = sevenzip_command_builder(tmpdir, 'e')

cmd += ' && '
currdir = tmpdir.tr('/', '\\')
currdir = tmpdir

1.upto(resource.strip_components).each do |count|
cmd += "for /f %#{count} in ('dir /ad /b \"#{currdir}\"') do "
Expand Down

0 comments on commit 7552305

Please sign in to comment.