From c29ab2d707c160fb246a2daf3439d9291f8ea4c9 Mon Sep 17 00:00:00 2001 From: Markus Reiter Date: Sun, 22 Jul 2018 18:24:01 +0200 Subject: [PATCH] Fix `DirectoryUnpackStrategy` permissions. --- Library/Homebrew/unpack_strategy.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Library/Homebrew/unpack_strategy.rb b/Library/Homebrew/unpack_strategy.rb index 99d93f863a..117a8105b1 100644 --- a/Library/Homebrew/unpack_strategy.rb +++ b/Library/Homebrew/unpack_strategy.rb @@ -96,7 +96,9 @@ class DirectoryUnpackStrategy < UnpackStrategy private def extract_to_dir(unpack_dir, basename:, verbose:) - FileUtils.cp_r File.join(path, "."), unpack_dir, preserve: true, verbose: verbose + path.children.each do |child| + FileUtils.copy_entry child, unpack_dir/child.basename, true, false + end end end