1
0
Fork 0
mirror of https://github.com/fog/fog.git synced 2022-11-09 13:51:43 -05:00

[s3] reject nil/empty keys correctly fog files.get

This commit is contained in:
geemus (Wesley Beary) 2010-03-30 12:09:44 -07:00
parent d3e375f2a1
commit e7f9305ee5

View file

@ -39,7 +39,7 @@ module Fog
'max-keys' => @max_keys,
'prefix' => @prefix
}.merge!(options)
options = options.reject {|key,value| value.nil? || value.empty?}
options = options.reject {|key,value| value.nil? || value.to_s.empty?}
data = connection.get_object(directory.name, key, options, &block)
file_data = {
:body => data.body,