diff --git a/lib/db/json.js b/lib/db/json.js index 9b5b68095b810031fbc27e0921c49fab390af76f..fc5705376d9535ad3d016cae47db599d952dc01d 100644 --- a/lib/db/json.js +++ b/lib/db/json.js @@ -82,6 +82,10 @@ function flush() { function sync() { try { db = JSON.parse(fs.readFileSync(dbPath)); + + // FIXME: + // at this point db might be missing some important fields + // we may want to fix this. In the meantime, delete your old json db } catch(e) { logger.error("Cannot read database from " + dbPath); }