+ Initial FILES.BBS support during file scan: A few formats supported so far, more to come...

* Detect DESCRIPT.ION, FILES.BBS, etc. during scans
This commit is contained in:
Bryan Ashby 2018-12-17 12:08:06 -07:00
parent 8356f00ba6
commit 832e04cdf0
3 changed files with 199 additions and 7 deletions

View file

@ -1,6 +1,8 @@
/* jslint node: true */
'use strict';
const { Errors } = require('./enig_error.js');
// deps
const fs = require('graceful-fs');
const iconv = require('iconv-lite');
@ -64,7 +66,10 @@ module.exports = class DescriptIonFile {
return nextLine(null);
},
() => {
return cb(null, descIonFile);
return cb(
descIonFile.entries.size > 0 ? null : Errors.Invalid('Invalid or unrecognized DESCRIPT.ION format'),
descIonFile
);
});
});
}