From d58e56729583c9fe21af64d36b4be722c6ac7530 Mon Sep 17 00:00:00 2001 From: vicent Date: Mon, 28 Nov 2022 08:51:04 +0100 Subject: [PATCH] fix: maneja si el dms no tiene file. Simplemente borra el registro --- back/methods/dms/deleteTrashFiles.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/back/methods/dms/deleteTrashFiles.js b/back/methods/dms/deleteTrashFiles.js index 63d7021c5..f14e65e9f 100644 --- a/back/methods/dms/deleteTrashFiles.js +++ b/back/methods/dms/deleteTrashFiles.js @@ -51,7 +51,7 @@ module.exports = Self => { const dstFile = path.join(dmsContainer.client.root, pathHash, dms.file); await fs.unlink(dstFile); } catch (err) { - if (err.code != 'ENOENT') + if (err.code != 'ENOENT' && dms.file) throw err; }