From b471ec8f2f6304fb420fb475b38d716a2e346f08 Mon Sep 17 00:00:00 2001 From: Cedric Godin Date: Mon, 5 Mar 2018 14:04:07 -0500 Subject: [PATCH] Bug fixes --- build.js | 1 + settings.js | 11 ++++++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/build.js b/build.js index cced454..1ef03dc 100644 --- a/build.js +++ b/build.js @@ -3,6 +3,7 @@ const rebuild = require('electron-rebuild').rebuild; packager({ dir: '.', + ignore: 'google-api-key.json', afterCopy: [ (buildPath, electronVersion, platform, arch, callback) => { rebuild({ buildPath, electronVersion, arch }) diff --git a/settings.js b/settings.js index c831154..cc3ac7b 100644 --- a/settings.js +++ b/settings.js @@ -1,6 +1,15 @@ const LocalStorage = require('node-localstorage').LocalStorage; +const os = require('os'); +const path = require('path'); +const fs = require('fs'); -const localStorage = new LocalStorage('./config'); +const odasStudioPath = path.join(os.homedir(), 'odas-studio'); +const storagePath = path.join(odasStudioPath, 'config'); + +if(!fs.existsSync(odasStudioPath)) + fs.mkdirSync(odasStudioPath); + +const localStorage = new LocalStorage(storagePath); class AppSettings { constructor() {