diff --git a/core/scanner_tossers/ftn_bso.js b/core/scanner_tossers/ftn_bso.js index adf266f5..c7466037 100644 --- a/core/scanner_tossers/ftn_bso.js +++ b/core/scanner_tossers/ftn_bso.js @@ -1041,10 +1041,14 @@ function FTNMessageScanTossModule() { } archivePath = paths.join(self.moduleConfig.paths.retain, `good-pkt-${ts}--${fn}`); - } else { + } else if('good' !== status) { archivePath = paths.join(self.moduleConfig.paths.reject, `${status}-${type}--${ts}-${fn}`); + } else { + return cb(null); // don't archive non-good/pkt files } + Log.debug( { origPath : origPath, archivePath : archivePath, type : type, status : status }, 'Archiving import file'); + fse.copy(origPath, archivePath, err => { if(err) { Log.warn( { error : err.message, origPath : origPath, archivePath : archivePath, type : type, status : status }, 'Failed to archive packet file'); @@ -1528,7 +1532,7 @@ FTNMessageScanTossModule.prototype.processTicFilesInDirectory = function(importD }); }, function process(ticFilesInfo, callback) { - async.each(ticFilesInfo, (ticFileInfo, nextTicInfo) => { + async.eachSeries(ticFilesInfo, (ticFileInfo, nextTicInfo) => { self.processSingleTicFile(ticFileInfo, err => { if(err) { // archive rejected TIC stuff (.TIC + attach)