Skip to content
This repository has been archived by the owner on Sep 19, 2023. It is now read-only.

Commit

Permalink
Merge pull request #34 from Yoshiin/yoshin/fix-empty-acceptedMimeType
Browse files Browse the repository at this point in the history
Fixing a bug where the file is not copied for analyse if the acceptedMimeType option is not present
  • Loading branch information
giomfo committed Apr 4, 2019
2 parents dd70705 + 4a7fdd5 commit 7662726
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/reporting.js
Original file line number Diff line number Diff line change
Expand Up @@ -293,12 +293,12 @@ async function generateReport(console, httpUrl, matrixFile, filePath, tempDir, s
console.info(`FileType: ${type.mime}`);
return {clean: false, info: 'File type not supported'};
}
try {
fs.copyFileSync(filePath, decryptedFilePath);
} catch (err) {
console.error(err);
throw new ClientError(400, 'Failed to copy file for decryption', 'MCS_MEDIA_FAILED_TO_DECRYPT');
}
}
try {
fs.copyFileSync(filePath, decryptedFilePath);
} catch (err) {
console.error(err);
throw new ClientError(400, 'Failed to copy file for decryption', 'MCS_MEDIA_FAILED_TO_DECRYPT');
}
}

Expand Down

0 comments on commit 7662726

Please sign in to comment.