Skip to content

Commit

Permalink
Fixed EXDEV issue in NW apps
Browse files Browse the repository at this point in the history
  • Loading branch information
louischatriot committed Dec 8, 2013
1 parent 119948a commit e6cc524
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lib/datastore.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
9 changes: 9 additions & 0 deletions lib/persistence.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
};

Expand Down

0 comments on commit e6cc524

Please sign in to comment.