From 7e5b4a2b0f7420ce258be6845b42a56bffa4c1bb Mon Sep 17 00:00:00 2001 From: brkagithub Date: Thu, 28 Nov 2024 15:59:01 +0100 Subject: [PATCH] skip path if doesn't exist --- src/service/pending-storage-service.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/service/pending-storage-service.js b/src/service/pending-storage-service.js index 46b52c9d6..4547766ad 100644 --- a/src/service/pending-storage-service.js +++ b/src/service/pending-storage-service.js @@ -102,6 +102,11 @@ class PendingStorageService { const filesToDelete = []; const collectFiles = async (basePath) => { + if (!(await this.fileService.pathExists(basePath))) { + this.logger.warn(`Storage path does not exist: ${basePath}`); + return; + } + const blockchainFolders = await this.fileService.readDirectory(basePath); for (const blockchain of blockchainFolders) {