summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorandy-dufour <adufour@chef.io>2015-09-28 13:16:21 -0400
committerJohn Keiser <john@johnkeiser.com>2015-09-28 17:16:10 -0700
commit88a197f61a1f3dde1d617bcc6fe08041388c7ea0 (patch)
tree4f30c322df1929d077b6074351b48c82f5044534
parent876ea381ff7064250c57c563c8724ac1f99fbab5 (diff)
downloadchef-88a197f61a1f3dde1d617bcc6fe08041388c7ea0.tar.gz
Updating to use count instead of split to sort files in remote_directory
-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 7549920c7a..3c1c50b963 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_by! { |x| x.split(::File::SEPARATOR).count }
+ files.sort_by! { |x| x.count(::File::SEPARATOR) }
end
# Either the explicit cookbook that the user sets on the resource, or the implicit