node-storage
Advanced tools
Comparing version 0.0.5 to 0.0.6
10
index.js
@@ -131,3 +131,3 @@ var fs = require('fs'); | ||
async.apply(self._fileMustNotExist, self.backupFilename), | ||
async.apply(self._doBackup, self.filename, self.backupFilename), | ||
async.apply(self._doBackup.bind(self)), | ||
async.apply(fs.writeFile, self.tempFilename, _data), | ||
@@ -139,4 +139,6 @@ async.apply(fs.rename, self.tempFilename, self.filename), | ||
Storage.prototype._doBackup = function (filename, backupname, cb) { | ||
fs.exists(filename, function (exists) { | ||
Storage.prototype._doBackup = function (cb) { | ||
var self = this; | ||
fs.exists(self.filename, function (exists) { | ||
if (!exists) { | ||
@@ -146,3 +148,3 @@ return cb(null); | ||
fs.rename(filename, backupname, cb); | ||
fs.rename(self.filename, self.backupFilename, cb); | ||
}); | ||
@@ -149,0 +151,0 @@ }; |
{ | ||
"name": "node-storage", | ||
"version": "0.0.5", | ||
"version": "0.0.6", | ||
"description": "Simple key-value file based store for node.js", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
236
8109