fix: jump to next iteration if file not found
gitea/salix/pipeline/head This commit looks good Details

This commit is contained in:
Vicent Llopis 2022-09-21 08:56:13 +02:00
parent 284524e3fa
commit 04676d5d98
1 changed files with 5 additions and 1 deletions

View File

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