lib/fog/aliyun/models/storage/files.rb in fog-aliyun-0.3.3 vs lib/fog/aliyun/models/storage/files.rb in fog-aliyun-0.3.4
- old
+ new
@@ -154,9 +154,10 @@
key
else
directory.key + '/' + key
end
data = service.head_object(object).data
+ return nil if data[:status] == 404
lastModified = data[:headers]['Last-Modified']
last_modified = (Time.parse(lastModified).localtime if !lastModified.nil? && lastModified != '')
date = data[:headers]['Date']
date = (Time.parse(date).localtime if !date.nil? && date != '')