Merge pull request #39 from steverandy/master

GridIO#get_md5 method should return server md5 when server and local md5 match.
This commit is contained in:
Kyle Banker 2011-05-09 08:10:51 -07:00
commit 0e31598ba1
1 changed files with 3 additions and 1 deletions

View File

@ -454,7 +454,9 @@ module Mongo
@server_md5 = @files.db.command(md5_command)['md5']
if @safe
@client_md5 = @local_md5.hexdigest
if @local_md5 != @server_md5
if @local_md5 == @server_md5
@server_md5
else
raise GridMD5Failure, "File on server failed MD5 check"
end
else