From 0f68f0507e691d1f0fdc42ee858ac4f4eaf233fe Mon Sep 17 00:00:00 2001 From: Kyle Spearrin Date: Mon, 27 Aug 2018 22:54:51 -0400 Subject: [PATCH] use string mode --- src/misc/nodeUtils.ts | 2 +- src/services/lowdbStorage.service.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/misc/nodeUtils.ts b/src/misc/nodeUtils.ts index e4a79276ca..d42db57a82 100644 --- a/src/misc/nodeUtils.ts +++ b/src/misc/nodeUtils.ts @@ -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) => { diff --git a/src/services/lowdbStorage.service.ts b/src/services/lowdbStorage.service.ts index 90943b34ff..1f6861a5af 100644 --- a/src/services/lowdbStorage.service.ts +++ b/src/services/lowdbStorage.service.ts @@ -18,7 +18,7 @@ export class LowdbStorageService implements StorageService { let adapter: lowdb.AdapterSync; 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);