Added 'Move to input' button to output file list. Improved zlib extraction efficiency.

This commit is contained in:
n1474335 2019-03-09 06:25:27 +00:00
parent 9fa7edffbf
commit 84d31c1d59
9 changed files with 94 additions and 28 deletions

View file

@ -62,12 +62,13 @@ class ExtractFiles extends Operation {
// Extract each file that we support
const files = [];
const errors = [];
detectedFiles.forEach(detectedFile => {
try {
files.push(extractFile(bytes, detectedFile.fileDetails, detectedFile.offset));
} catch (err) {
if (!ignoreFailedExtractions && err.message.indexOf("No extraction algorithm available") < 0) {
throw new OperationError(
errors.push(
`Error while attempting to extract ${detectedFile.fileDetails.name} ` +
`at offset ${detectedFile.offset}:\n` +
`${err.message}`
@ -76,9 +77,14 @@ class ExtractFiles extends Operation {
}
});
if (errors.length) {
throw new OperationError(errors.join("\n\n"));
}
return files;
}
/**
* Displays the files in HTML for web apps.
*