From 1445f7341ec0de34562278ae658b29aa540eb9f3 Mon Sep 17 00:00:00 2001 From: Matthias Date: Mon, 22 Aug 2022 15:28:25 +0200 Subject: [PATCH] Fixed err log in filesystem unlink --- src/services/filesystem.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/services/filesystem.ts b/src/services/filesystem.ts index c3562fb..a74f756 100644 --- a/src/services/filesystem.ts +++ b/src/services/filesystem.ts @@ -59,9 +59,9 @@ export default class FileSystemService { (await node.children).map((child) => this.delete(child)) ); else - unlink(`files/${node.id}`, (err) => - console.error(`Error while deleting ${node.id}`, err) - ); + unlink(`files/${node.id}`, (err) => { + if (err) console.error(`Error while deleting ${node.id}`, err); + }); await this.inodeRepo.remove(node); }