Fixed err log in filesystem unlink

This commit is contained in:
Mutzi 2022-08-22 15:28:25 +02:00
parent cc6feb3171
commit 1445f7341e

View File

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