1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-09-13 01:58:44 +02:00

use string mode

This commit is contained in:
Kyle Spearrin 2018-08-27 22:54:51 -04:00
parent 0d15ae8615
commit 0f68f0507e
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 = '755', 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, '755');
}
const p = path.join(dir, 'data.json');
adapter = new FileSync(p);