diff --git a/back/methods/dms/deleteTrashFiles.js b/back/methods/dms/deleteTrashFiles.js index 9da508285..e8b342ccc 100644 --- a/back/methods/dms/deleteTrashFiles.js +++ b/back/methods/dms/deleteTrashFiles.js @@ -53,8 +53,12 @@ module.exports = Self => { const pathHash = DmsContainer.getHash(dms.id); const dmsContainer = await DmsContainer.container(pathHash); const dstFile = path.join(dmsContainer.client.root, pathHash, dms.file); + try { + await fs.unlink(dstFile); + } catch (err) { + continue; + } const dstFolder = path.join(dmsContainer.client.root, pathHash); - await fs.unlink(dstFile); try { await fs.rmdir(dstFolder); await dms.destroy(myOptions);