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); }