From 8aab918ac5b9c0b945f3e101ec11cce9acdaa7b3 Mon Sep 17 00:00:00 2001 From: Book Pauk Date: Sat, 15 Oct 2022 21:04:56 +0700 Subject: [PATCH] =?UTF-8?q?=D0=9F=D0=BE=D0=BF=D1=80=D0=B0=D0=B2=D0=B8?= =?UTF-8?q?=D0=BB=20=D0=B1=D0=B0=D0=B3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server/core/InpxHashCreator.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/server/core/InpxHashCreator.js b/server/core/InpxHashCreator.js index 26a9b5f..35460da 100644 --- a/server/core/InpxHashCreator.js +++ b/server/core/InpxHashCreator.js @@ -25,7 +25,11 @@ class InpxHashCreator { } async getInpxFileHash() { - return await utils.getFileHash(this.config.inpxFile, 'sha256', 'hex'); + return ( + await fs.pathExists(this.config.inpxFile) ? + await utils.getFileHash(this.config.inpxFile, 'sha256', 'hex') : + '' + ); } }