Always initialize @metadata and @aliases

This commit is contained in:
Wojciech Piekutowski 2011-02-20 17:09:18 +01:00
parent 62900acb4b
commit d12987bf7a
1 changed files with 2 additions and 2 deletions

View File

@ -335,8 +335,8 @@ module Mongo
@files_id = opts.delete(:_id) || BSON::ObjectId.new
@content_type = opts.delete(:content_type) || (defined? MIME) && get_content_type || DEFAULT_CONTENT_TYPE
@chunk_size = opts.delete(:chunk_size) || DEFAULT_CHUNK_SIZE
@metadata = opts.delete(:metadata) if opts[:metadata]
@aliases = opts.delete(:aliases) if opts[:aliases]
@metadata = opts.delete(:metadata)
@aliases = opts.delete(:aliases)
@file_length = 0
opts.each {|k, v| self[k] = v}
check_existing_file if @safe