diff options
Diffstat (limited to 'lib/chef/chef_fs/file_system/rest_list_dir.rb')
-rw-r--r-- | lib/chef/chef_fs/file_system/rest_list_dir.rb | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/chef/chef_fs/file_system/rest_list_dir.rb b/lib/chef/chef_fs/file_system/rest_list_dir.rb index 594fec8ab6..b7ee51d284 100644 --- a/lib/chef/chef_fs/file_system/rest_list_dir.rb +++ b/lib/chef/chef_fs/file_system/rest_list_dir.rb @@ -45,7 +45,7 @@ class Chef def children begin - @children ||= Chef::ChefFS::RawRequest.raw_json(rest, api_path).keys.sort.map do |key| + @children ||= root.get_json(api_path).keys.sort.map do |key| _make_child_entry("#{key}.json", true) end rescue Timeout::Error => e @@ -76,7 +76,7 @@ class Chef end begin - rest.post_rest(api_path, object) + rest.post(api_path, object) rescue Timeout::Error => e raise Chef::ChefFS::FileSystem::OperationFailedError.new(:create_child, self, e), "Timeout creating '#{name}': #{e}" rescue Net::HTTPServerException => e @@ -89,6 +89,8 @@ class Chef end end + @children = nil + result end |