mirror of
https://github.com/NuSkooler/enigma-bbs.git
synced 2025-06-10 14:44:40 +02:00
* Start work on FTN/BSO schedule via later.js
* Utilize last scan message ID to scan areas * Lots of changes to FTN packet creation * Create packets with target max size * Create ArcMail bundles when configured to do so
This commit is contained in:
parent
ae20dc1f7c
commit
76bbc43600
7 changed files with 595 additions and 27 deletions
|
@ -50,6 +50,15 @@ module.exports = class ArchiveUtil {
|
|||
});
|
||||
}
|
||||
}
|
||||
|
||||
haveArchiver(archType) {
|
||||
if(!archType) {
|
||||
return false;
|
||||
}
|
||||
|
||||
archType = archType.toLowerCase();
|
||||
return archType in this.archivers;
|
||||
}
|
||||
|
||||
detectType(path, cb) {
|
||||
fs.open(path, 'r', (err, fd) => {
|
||||
|
@ -83,7 +92,9 @@ module.exports = class ArchiveUtil {
|
|||
}
|
||||
|
||||
compressTo(archType, archivePath, files, cb) {
|
||||
archType = archType.toLowerCase();
|
||||
const archiver = this.archivers[archType];
|
||||
|
||||
if(!archiver) {
|
||||
cb(new Error('Unknown archive type: ' + archType));
|
||||
return;
|
||||
|
@ -104,7 +115,7 @@ module.exports = class ArchiveUtil {
|
|||
});
|
||||
|
||||
comp.on('exit', exitCode => {
|
||||
cb(0 === exitCode ? null : new Error('Compression failed with exit code: ' + exitCode));
|
||||
cb(exitCode ? new Error('Compression failed with exit code: ' + exitCode) : null);
|
||||
});
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue