1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-11-27 12:36:14 +01:00

change to 700 perms

This commit is contained in:
Kyle Spearrin 2018-08-27 22:59:50 -04:00
parent 0f68f0507e
commit 3c43265878
2 changed files with 2 additions and 2 deletions

View File

@ -2,7 +2,7 @@ import * as fs from 'fs';
import * as path from 'path';
export class NodeUtils {
static mkdirpSync(targetDir: string, mode = '755', relative = false, relativeDir: string = null) {
static mkdirpSync(targetDir: string, mode = '700', relative = false, relativeDir: string = null) {
const initialDir = path.isAbsolute(targetDir) ? path.sep : '';
const baseDir = relative ? (relativeDir != null ? relativeDir : __dirname) : '.';
targetDir.split(path.sep).reduce((parentDir, childDir) => {

View File

@ -18,7 +18,7 @@ export class LowdbStorageService implements StorageService {
let adapter: lowdb.AdapterSync<any>;
if (Utils.isNode && dir != null) {
if (!fs.existsSync(dir)) {
NodeUtils.mkdirpSync(dir, '755');
NodeUtils.mkdirpSync(dir, '700');
}
const p = path.join(dir, 'data.json');
adapter = new FileSync(p);