diff --git a/core/scanner_tossers/ftn_bso.js b/core/scanner_tossers/ftn_bso.js index c7466037..d1435c90 100644 --- a/core/scanner_tossers/ftn_bso.js +++ b/core/scanner_tossers/ftn_bso.js @@ -1353,11 +1353,6 @@ function FTNMessageScanTossModule() { }); }, function scan(localInfo, callback) { - let ldesc = ticFileInfo.getAsString('Ldesc', '\n'); - if(ldesc) { - ldesc = ldesc.trim(); - } - const scanOpts = { sha256 : localInfo.sha256, // *may* have already been calculated meta : { @@ -1365,7 +1360,7 @@ function FTNMessageScanTossModule() { short_file_name : ticFileInfo.getAsString('File').toUpperCase(), // upper to ensure no case issues later; this should be a DOS 8.3 name tic_origin : ticFileInfo.getAsString('Origin'), tic_desc : ticFileInfo.getAsString('Desc'), - tic_ldesc : ldesc, + tic_ldesc : ticFileInfo.getAsString('Ldesc', '\n'), upload_by_username : _.get(Config.scannerTossers.ftn_bso.nodes, [ localInfo.node, 'tic', 'uploadBy' ]) || Config.scannerTossers.ftn_bso.tic.uploadBy, } }; diff --git a/core/tic_file_info.js b/core/tic_file_info.js index 0cb41c68..af9b7dfd 100644 --- a/core/tic_file_info.js +++ b/core/tic_file_info.js @@ -232,7 +232,12 @@ module.exports = class TicFileInfo { return; } - value = line.substr(keyEnd + 1).trim(); + value = line.substr(keyEnd + 1); + + // don't trim Ldesc; may mess with FILE_ID.DIZ type descriptions + if('ldesc' !== key) { + value = value.trim(); + } // convert well known keys to a more reasonable format switch(key) {