felixge/node-dirty — Issue #30: db.set(undefined,...) corrupts db file
Author: broofa
Created: 2011-11-02 14:29:17+00:00
State: open

Like so ...

$ node
> var db = require('dirty')('test.db')
> db.set(undefined, 'foobar')
> var db = require('dirty')('test.db')
>
events.js:45
throw arguments[1]; // Unhandled 'error' event
^
Error: Could not load corrupted row: {"val":"foobar"}
at /home/rkieffer/projects/andale/node_modules/dirty/lib/dirty/dirty.js:107:30
at Array.forEach (native)
at [object Object]. (/home/rkieffer/projects/andale/node_modules/dirty/lib/dirty/dirty.js:96:11)
at [object Object].emit (events.js:64:17)
at [object Object]._emitData (fs.js:914:29)
at afterRead (fs.js:898:10)
at wrapper (fs.js:245:17)