summaryrefslogtreecommitdiff
path: root/lib/chef/role.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/chef/role.rb')
-rw-r--r--lib/chef/role.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/chef/role.rb b/lib/chef/role.rb
index ed22bc87e4..9b6fa1c59d 100644
--- a/lib/chef/role.rb
+++ b/lib/chef/role.rb
@@ -253,7 +253,7 @@ class Chef
def self.from_disk(name)
paths = Array(Chef::Config[:role_path])
paths.each do |path|
- roles_files = Dir.glob(File.join(Chef::Util::PathHelper.escape_glob(path), "**", "**"))
+ roles_files = Dir.glob(File.join(Chef::Util::PathHelper.escape_glob_dir(path), "**", "**"))
js_files = roles_files.select { |file| file.match(/\/#{name}\.json$/) }
rb_files = roles_files.select { |file| file.match(/\/#{name}\.rb$/) }
if js_files.count > 1 or rb_files.count > 1