Comparing version 0.1.4 to 0.1.5
{ | ||
"name": "ramlitedb", | ||
"version": "0.1.4", | ||
"version": "0.1.5", | ||
"description": "NoSQL Database for node.js with all data loaded in ram and backup in json file", | ||
@@ -5,0 +5,0 @@ "main": "src/index.js", |
@@ -34,4 +34,6 @@ /** | ||
return pfsLib.write(_conf.user.backupFile, "{}"); | ||
}).catch((e) => { | ||
_conf.user.log('Error : Unable to create the backup file :', e); | ||
}).then(() => { | ||
return pfsLib.readFile(_conf.user.backupFile); | ||
return pfsLib.read(_conf.user.backupFile); | ||
}).then((data) => { | ||
@@ -45,4 +47,4 @@ try { | ||
} | ||
}).catch(() => { | ||
_conf.user.log('Error : Unable to read / write the backup file'); | ||
}).catch((e) => { | ||
_conf.user.log('Error : Unable to read the backup file :', e); | ||
}); | ||
@@ -49,0 +51,0 @@ } |
15867
273