Skip to content

BSON-Parser throws when collection contains no documents #14

@cdxOo

Description

@cdxOo

When trying to restore a dump that contains a collection that has no documents in it, the BSON parser throws with 'Error: corrupt bson message'. The bson file representing the empty collection is 0 bytes and therefor invalid bson.

In fromJson() just test for data.length before deserializing and pushing to docsBulk to fix this

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions