* Allow alternate matching group order for archive short/long desc

* max short/long desc file input byte size (ignore files larger than N)
* Add Arj support via 'arj'
This commit is contained in:
Bryan Ashby 2017-01-29 22:30:48 -07:00
parent 9525afddd3
commit 6f1015305b
6 changed files with 65 additions and 23 deletions

View file

@ -256,18 +256,16 @@ module.exports = class ArchiveUtil {
if(exitCode) {
return cb(new Error(`List failed with exit code: ${exitCode}`));
}
//if(err) {
// return cb(err);
// }
const entryGroupOrder = archiver.list.entryGroupOrder || { byteSize : 1, fileName : 2 };
const entries = [];
const entryMatchRe = new RegExp(archiver.list.entryMatch, 'gm');
let m;
while((m = entryMatchRe.exec(output))) {
// :TODO: allow alternate ordering!!!
entries.push({
byteSize : parseInt(m[1]),
fileName : m[2],
byteSize : parseInt(m[entryGroupOrder.byteSize]),
fileName : m[entryGroupOrder.fileName],
});
}