Skip to content

Commit

Permalink
nw: update settings save path
Browse files Browse the repository at this point in the history
  • Loading branch information
themitosan committed May 19, 2023
1 parent c76995c commit d571f7b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions App/js/options.js
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ temp_OPTIONS = {
loadSettings: function(){

// Get file path
const fPath = nw.__dirname + '/Settings.json';
const fPath = APP.tools.fixPath(APP.path.parse(process.execPath).dir) + '/Settings.json';

if (APP.fs.existsSync(fPath) === !1){
APP.options.saveSettings();
Expand All @@ -234,7 +234,7 @@ temp_OPTIONS = {
saveSettings: function(){

try {
APP.fs.writeFileSync(nw.__dirname + '/Settings.json', JSON.stringify(this.settingsData), 'utf8');
APP.fs.writeFileSync(APP.tools.fixPath(APP.path.parse(process.execPath).dir) + '/Settings.json', JSON.stringify(this.settingsData), 'utf8');
} catch (err) {
window.alert('ERROR - Unable to save settings!\n' + err);
throw new Error(err);
Expand Down

0 comments on commit d571f7b

Please sign in to comment.