mirror of
https://github.com/bitwarden/browser.git
synced 2024-11-05 09:10:53 +01:00
use string mode
This commit is contained in:
parent
0d15ae8615
commit
0f68f0507e
@ -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) => {
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user