diff options
author | Claire McQuin <claire@getchef.com> | 2014-09-19 11:48:59 -0700 |
---|---|---|
committer | Claire McQuin <claire@getchef.com> | 2014-09-22 11:22:29 -0700 |
commit | b22d0293c0c9d0de1531d1247dc522be816fb1be (patch) | |
tree | b6f283636b3240e1da8d883d4e09cfad49e2c8be /lib/chef/util | |
parent | ab628a9bb39e06a3b56913b240ee767a031c517d (diff) | |
download | chef-b22d0293c0c9d0de1531d1247dc522be816fb1be.tar.gz |
Escape path for globbing.
Diffstat (limited to 'lib/chef/util')
-rw-r--r-- | lib/chef/util/backup.rb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/chef/util/backup.rb b/lib/chef/util/backup.rb index 43e3434050..0cc009ca1f 100644 --- a/lib/chef/util/backup.rb +++ b/lib/chef/util/backup.rb @@ -16,6 +16,8 @@ # limitations under the License. # +require 'chef/util/path_helper' + class Chef class Util class Backup @@ -77,9 +79,8 @@ class Chef end def sorted_backup_files - Dir[::File.join(prefix, ".#{path}.chef-*")].sort { |a,b| b <=> a } + Dir[Chef::Util::PathHelper.escape_glob(prefix, ".#{path}") + ".chef-*"].sort { |a,b| b <=> a } end end end end - |