mirror of
https://github.com/NuSkooler/enigma-bbs.git
synced 2025-08-02 16:01:55 +02:00
* 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:
parent
9525afddd3
commit
6f1015305b
6 changed files with 65 additions and 23 deletions
|
@ -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],
|
||||
});
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue