diff options
author | andy-dufour <adufour@chef.io> | 2015-09-22 13:33:32 -0400 |
---|---|---|
committer | John Keiser <john@johnkeiser.com> | 2015-09-28 17:16:10 -0700 |
commit | 876ea381ff7064250c57c563c8724ac1f99fbab5 (patch) | |
tree | 7246ea909cb14cfd7400806cec61ccd68f5bdd20 | |
parent | 8d32fdd4377476a9f7dc36a864ccdaa17c32b3a1 (diff) | |
download | chef-876ea381ff7064250c57c563c8724ac1f99fbab5.tar.gz |
Fix for #3942 - change remote_directory resource file discovery to traverse breadth first
-rw-r--r-- | lib/chef/provider/remote_directory.rb | 2 |
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 |