summaryrefslogtreecommitdiff
path: root/lib/chef/util
diff options
context:
space:
mode:
authorClaire McQuin <claire@getchef.com>2014-09-24 10:54:47 -0700
committerClaire McQuin <claire@getchef.com>2014-09-24 10:54:47 -0700
commitf7407baf9df38f5f2f58e1e676e710411fb49f7b (patch)
treefd239a84f992eb9c9fb52d80e40198176e52378b /lib/chef/util
parent2d6d41d9b2465d3bc1e9f11b6d1197500f8859cc (diff)
downloadchef-f7407baf9df38f5f2f58e1e676e710411fb49f7b.tar.gz
Add spec for escape_glob with multiple path parts.
Diffstat (limited to 'lib/chef/util')
-rw-r--r--lib/chef/util/path_helper.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/chef/util/path_helper.rb b/lib/chef/util/path_helper.rb
index 3dde7b1887..8ca8279593 100644
--- a/lib/chef/util/path_helper.rb
+++ b/lib/chef/util/path_helper.rb
@@ -138,7 +138,7 @@ class Chef
# to be escaped before globbing can be done.
# http://stackoverflow.com/questions/14127343
def self.escape_glob(*parts)
- path = cleanpath(join(parts))
+ path = cleanpath(join(*parts))
path.gsub(/[\\\{\}\[\]\*\?]/) { |x| "\\"+x }
end
end