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:
parent
0f68f0507e
commit
3c43265878
@ -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) => {
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user