diff options
-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 - |