fix: maneja si el dms no tiene file. Simplemente borra el registro
gitea/salix/pipeline/head There was a failure building this commit Details

This commit is contained in:
Vicent Llopis 2022-11-28 08:51:04 +01:00
parent ca0164ff18
commit d58e567295
1 changed files with 1 additions and 1 deletions

View File

@ -51,7 +51,7 @@ module.exports = Self => {
const dstFile = path.join(dmsContainer.client.root, pathHash, dms.file); const dstFile = path.join(dmsContainer.client.root, pathHash, dms.file);
await fs.unlink(dstFile); await fs.unlink(dstFile);
} catch (err) { } catch (err) {
if (err.code != 'ENOENT') if (err.code != 'ENOENT' && dms.file)
throw err; throw err;
} }