From 2bb6c1c1da55b90f5c16244e290101b6d6703378 Mon Sep 17 00:00:00 2001 From: vicent Date: Thu, 1 Dec 2022 07:54:32 +0100 Subject: [PATCH] fix: borra registros aunq no tengan file adjunto --- 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; }