Skip to content

Commit

Permalink
Fixed a problem with writing to files
Browse files Browse the repository at this point in the history
The logins.json file is now created with write permissions
  • Loading branch information
SebOuellette committed Dec 6, 2021
1 parent 33b2fc1 commit 6c7e02f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ let barry = false;

// Disable the security warning from electron that comes from using an uncompiled version
process.env['ELECTRON_DISABLE_SECURITY_WARNINGS'] = true;
// Set the permissions umask to 0, allowing writing to files using the exact specified permissions
process.umask(0);
// Allows LiveBot to work as an executable
process.chdir(__dirname);
// Display that LiveBot has started
Expand Down
2 changes: 1 addition & 1 deletion js/userSettings.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ let settings = {
set settings(args) {
let settings = this.settings;
settings = { ...settings, ...args };
fs.writeFileSync("json/logins.json", JSON.stringify(settings));
fs.writeFileSync("json/logins.json", JSON.stringify(settings), {mode: parseInt('0666', 8)});
},

set rawSettings(args) {
Expand Down

0 comments on commit 6c7e02f

Please sign in to comment.