Skip to content

Commit

Permalink
decode body to array
Browse files Browse the repository at this point in the history
  • Loading branch information
kzaitsev committed Jan 15, 2014
1 parent 5dad9a5 commit 3c7eb60
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/fog/openstack/models/storage/directories.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ def get(key, options = {})
end
directory.files.merge_attributes(options)
directory.files.instance_variable_set(:@loaded, true)

data.body = Fog::JSON.decode(data.body) unless data.body.is_a? Array
data.body.each do |file|
directory.files << directory.files.new(file)
end
Expand Down

0 comments on commit 3c7eb60

Please sign in to comment.