diff options
author | Claire McQuin <claire@getchef.com> | 2014-09-19 12:43:18 -0700 |
---|---|---|
committer | Claire McQuin <claire@getchef.com> | 2014-09-22 11:22:31 -0700 |
commit | c88a198f1612b806261fde30ac17871b4d98a85d (patch) | |
tree | 14fcb78aaf9b6beaaa93a64b6e0dec8444b38d3a | |
parent | fdf6490fbebd4c102624bacb6e8eee8d0b2fb031 (diff) | |
download | chef-c88a198f1612b806261fde30ac17871b4d98a85d.tar.gz |
Excape path for globbing.
-rw-r--r-- | lib/chef/provider/remote_directory.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/chef/provider/remote_directory.rb b/lib/chef/provider/remote_directory.rb index 77e2754b08..553eb14ae5 100644 --- a/lib/chef/provider/remote_directory.rb +++ b/lib/chef/provider/remote_directory.rb @@ -26,6 +26,7 @@ require 'uri' require 'tempfile' require 'net/https' require 'set' +require 'chef/util/path_helper' class Chef class Provider @@ -35,7 +36,7 @@ class Chef def action_create super - files_to_purge = Set.new(Dir.glob(::File.join(@new_resource.path, '**', '*'), + files_to_purge = Set.new(Dir.glob(::File.join(Chef::Util::PathHelper.escape_glob(@new_resource.path), '**', '*'), ::File::FNM_DOTMATCH).select do |name| name !~ /(?:^|#{Regexp.escape(::File::SEPARATOR)})\.\.?$/ end) |