Repository: buildr Updated Branches: refs/heads/master fa4750b70 -> ea4103fb8
BUILDR-621: ZipTask creates zip file with entries not sorted by path causing very slow unzipping. Add sorting of entry keys prior to writing to the ZipOutputStream. Project: http://git-wip-us.apache.org/repos/asf/buildr/repo Commit: http://git-wip-us.apache.org/repos/asf/buildr/commit/ea4103fb Tree: http://git-wip-us.apache.org/repos/asf/buildr/tree/ea4103fb Diff: http://git-wip-us.apache.org/repos/asf/buildr/diff/ea4103fb Branch: refs/heads/master Commit: ea4103fb8e01cd29df7729fec75796fe3c792dc5 Parents: fa4750b Author: Antoine Toulme <[email protected]> Authored: Thu May 19 23:55:03 2016 -0700 Committer: Antoine Toulme <[email protected]> Committed: Thu May 19 23:55:03 2016 -0700 ---------------------------------------------------------------------- CHANGELOG | 1 + lib/buildr/packaging/ziptask.rb | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/buildr/blob/ea4103fb/CHANGELOG ---------------------------------------------------------------------- diff --git a/CHANGELOG b/CHANGELOG index f5b4b2a..7d2b977 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -14,6 +14,7 @@ * Added: BUILDR-703 release: allow THIS_VERSION to be defined in another file * Fixed: BUILDR-674 Artifacts with bundle extension cannot be downloaded by Buildr * Fixed: BUILDR-565 resources are not included in the war if defined after package call +* Fixed: BUILDR-621 ZipTask creates zip file with entries not sorted by path causing very slow unzipping. 1.4.25 (2016-04-18) * Change: BUILDR-712 Update jruby-openssl dependency version or support a range of versions http://git-wip-us.apache.org/repos/asf/buildr/blob/ea4103fb/lib/buildr/packaging/ziptask.rb ---------------------------------------------------------------------- diff --git a/lib/buildr/packaging/ziptask.rb b/lib/buildr/packaging/ziptask.rb index 644c0b5..8fe9d51 100644 --- a/lib/buildr/packaging/ziptask.rb +++ b/lib/buildr/packaging/ziptask.rb @@ -63,7 +63,9 @@ module Buildr #:nodoc: end end - file_map.each do |path, content| + paths = file_map.keys.sort + paths.each do |path| + content = file_map[path] warn "Warning: Path in zipfile #{name} contains backslash: #{path}" if path =~ /\\/ mkpath.call File.dirname(path) if content.respond_to?(:call)
