Browse Source

Поправил баг

Book Pauk 2 years ago
parent
commit
8aab918ac5
1 changed files with 5 additions and 1 deletions
  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') :
+            ''
+        );
     }
 }