diff --git a/lib/datastore.js b/lib/datastore.js index 8e432a8..886e7e5 100644 --- a/lib/datastore.js +++ b/lib/datastore.js @@ -560,6 +560,6 @@ Datastore.prototype._remove = function (query, options, cb) { Datastore.prototype.remove = function () { this.executor.push({ this: this, fn: this._remove, arguments: arguments }); }; - + module.exports = Datastore; \ No newline at end of file diff --git a/lib/persistence.js b/lib/persistence.js index 4f28f9d..a7fe72d 100644 --- a/lib/persistence.js +++ b/lib/persistence.js @@ -37,7 +37,16 @@ function Persistence (options) { // For NW apps, store data in the same directory where NW stores application data if (this.filename && options.nodeWebkitAppName) { + console.log("=================================================================="); + console.log("WARNING: The nodeWebkitAppName option is deprecated"); + console.log("To get the path to the directory where Node Webkit stores the data"); + console.log("for your app, use the internal nw.gui module like this"); + console.log("require('nw.gui').App.dataPath"); + console.log("See https://github.com/rogerwang/node-webkit/issues/500"); + console.log("=================================================================="); this.filename = Persistence.getNWAppFilename(options.nodeWebkitAppName, this.filename); + this.tempFilename = Persistence.getNWAppFilename(options.nodeWebkitAppName, this.tempFilename); + this.oldFilename = Persistence.getNWAppFilename(options.nodeWebkitAppName, this.oldFilename); } };