fix: reading chunks from an empty (zero-length) grid-stored file
reading chunks from an empty file caused an endless loop
This commit is contained in:
parent
3cb1e4644b
commit
6e66b11f6e
|
@ -253,6 +253,7 @@ module Mongo
|
|||
return read_all unless block_given?
|
||||
while chunk = read(chunk_size)
|
||||
yield chunk
|
||||
break if chunk.empty?
|
||||
end
|
||||
self
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue