summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorandy-dufour <adufour@chef.io>2015-09-22 13:33:32 -0400
committerJohn Keiser <john@johnkeiser.com>2015-09-28 17:16:10 -0700
commit876ea381ff7064250c57c563c8724ac1f99fbab5 (patch)
tree7246ea909cb14cfd7400806cec61ccd68f5bdd20
parent8d32fdd4377476a9f7dc36a864ccdaa17c32b3a1 (diff)
downloadchef-876ea381ff7064250c57c563c8724ac1f99fbab5.tar.gz
Fix for #3942 - change remote_directory resource file discovery to traverse breadth first
-rw-r--r--lib/chef/provider/remote_directory.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/chef/provider/remote_directory.rb b/lib/chef/provider/remote_directory.rb
index 56c2ff0caf..7549920c7a 100644
--- a/lib/chef/provider/remote_directory.rb
+++ b/lib/chef/provider/remote_directory.rb
@@ -161,7 +161,7 @@ class Chef
def files_to_transfer
cookbook = run_context.cookbook_collection[resource_cookbook]
files = cookbook.relative_filenames_in_preferred_directory(node, :files, source)
- files.sort!.reverse!
+ files.sort_by! { |x| x.split(::File::SEPARATOR).count }
end
# Either the explicit cookbook that the user sets on the resource, or the implicit