diff options
author | Florian Dold <florian.dold@gmail.com> | 2017-08-14 05:01:11 +0200 |
---|---|---|
committer | Florian Dold <florian.dold@gmail.com> | 2017-08-14 05:02:09 +0200 |
commit | 363723fc84f7b8477592e0105aeb331ec9a017af (patch) | |
tree | 29f92724f34131bac64d6a318dd7e30612e631c7 /node_modules/configstore/index.js | |
parent | 5634e77ad96bfe1818f6b6ee70b7379652e5487f (diff) |
node_modules
Diffstat (limited to 'node_modules/configstore/index.js')
-rw-r--r-- | node_modules/configstore/index.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/node_modules/configstore/index.js b/node_modules/configstore/index.js index 166de5349..4883613ca 100644 --- a/node_modules/configstore/index.js +++ b/node_modules/configstore/index.js @@ -10,7 +10,7 @@ const uniqueString = require('unique-string'); const configDir = xdgBasedir.config || path.join(os.tmpdir(), uniqueString()); const permissionError = 'You don\'t have access to this file.'; -const defaultPathMode = 0o0700; +const makeDirOptions = {mode: 0o0700}; const writeFileOptions = {mode: 0o0600}; class Configstore { @@ -30,7 +30,7 @@ class Configstore { } catch (err) { // Create dir if it doesn't exist if (err.code === 'ENOENT') { - makeDir.sync(path.dirname(this.path), defaultPathMode); + makeDir.sync(path.dirname(this.path), makeDirOptions); return {}; } @@ -51,7 +51,7 @@ class Configstore { set all(val) { try { // Make sure the folder exists as it could have been deleted in the meantime - makeDir.sync(path.dirname(this.path), defaultPathMode); + makeDir.sync(path.dirname(this.path), makeDirOptions); writeFileAtomic.sync(this.path, JSON.stringify(val, null, '\t'), writeFileOptions); } catch (err) { |