فهرست منبع

Поправил баг

Book Pauk 2 سال پیش
والد
کامیت
8aab918ac5
1فایلهای تغییر یافته به همراه5 افزوده شده و 1 حذف شده
  1. 5 1
      server/core/InpxHashCreator.js

+ 5 - 1
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') :
+            ''
+        );
     }
 }