Fix various minor mistakes
This commit is contained in:
parent
351ae52776
commit
c9ff904b2b
|
@ -112,7 +112,6 @@ function ansiAttemptDetectUTF8(client, cb) {
|
|||
}
|
||||
}
|
||||
return cb(null);
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -401,7 +401,7 @@ function extractAndProcessDescFiles(fileEntry, filePath, archiveEntries, cb) {
|
|||
//
|
||||
// :TODO: This isn't really always the case - how to handle this? We could do a quick detection...
|
||||
const decodedData = iconv.decode(data, 'cp437');
|
||||
fileEntry[descType] = sliceAtSauceMarker(decodedData, 0x1a);
|
||||
fileEntry[descType] = sliceAtSauceMarker(decodedData);
|
||||
fileEntry[`${descType}Src`] = 'descFile';
|
||||
return next(null);
|
||||
});
|
||||
|
@ -575,7 +575,7 @@ function populateFileEntryInfoFromFile(fileEntry, filePath, cb) {
|
|||
`${_.upperFirst(descType)} description command failed`
|
||||
);
|
||||
} else {
|
||||
stdout = (stdout || '').trim();
|
||||
stdout = stdout.trim();
|
||||
if(stdout.length > 0) {
|
||||
const key = 'short' === descType ? 'desc' : 'descLong';
|
||||
if('desc' === key) {
|
||||
|
|
|
@ -329,8 +329,8 @@ module.exports = class Message {
|
|||
appendWhereClause(`m.area_tag = "${Message.WellKnownAreaTags.Private}"`);
|
||||
appendWhereClause(
|
||||
`m.message_id IN (
|
||||
SELECT message_id
|
||||
FROM message_meta
|
||||
SELECT message_id
|
||||
FROM message_meta
|
||||
WHERE meta_category = "System" AND meta_name = "${Message.SystemMetaNames.LocalToUserID}" AND meta_value = ${filter.privateTagUserId}
|
||||
)`);
|
||||
} else {
|
||||
|
@ -619,7 +619,7 @@ module.exports = class Message {
|
|||
}
|
||||
|
||||
const metaStmt = transOrDb.prepare(
|
||||
`INSERT INTO message_meta (message_id, meta_category, meta_name, meta_value)
|
||||
`INSERT INTO message_meta (message_id, meta_category, meta_name, meta_value)
|
||||
VALUES (?, ?, ?, ?);`);
|
||||
|
||||
if(!_.isArray(value)) {
|
||||
|
@ -840,7 +840,7 @@ module.exports = class Message {
|
|||
} else {
|
||||
const QUOTE_RE = /^ ((?:[A-Za-z0-9]{2}> )+(?:[A-Za-z0-9]{2}>)*) */;
|
||||
const quoted = [];
|
||||
const input = _.trimEnd(this.message).replace(/\b/g, '');
|
||||
const input = _.trimEnd(this.message).replace(/\x08/g, '');
|
||||
|
||||
// find *last* tearline
|
||||
let tearLinePos = this.getTearLinePosition(input);
|
||||
|
|
|
@ -275,7 +275,7 @@ class NNTPServer extends NNTPServerBase {
|
|||
//
|
||||
const remoteFrom = _.get(message.meta, [ 'System', Message.SystemMetaNames.RemoteFromUser ]);
|
||||
message.nntpHeaders['X-FTN-From'] = remoteFrom ? `${fromName} <${remoteFrom}>` : fromName;
|
||||
const remoteTo = _.get(message.meta [ 'System', Message.SystemMetaNames.RemoteToUser ]);
|
||||
const remoteTo = _.get(message.meta, [ 'System', Message.SystemMetaNames.RemoteToUser ]);
|
||||
message.nntpHeaders['X-FTN-To'] = remoteTo ? `${toName} <${remoteTo}>` : toName;
|
||||
|
||||
if(!message.replyToMsgId) {
|
||||
|
|
|
@ -29,9 +29,11 @@ exports.isAnsiLine = isAnsiLine;
|
|||
exports.isFormattedLine = isFormattedLine;
|
||||
exports.splitTextAtTerms = splitTextAtTerms;
|
||||
|
||||
// :TODO: create Unicode verison of this
|
||||
const VOWELS = [ 'a', 'e', 'i', 'o', 'u' ];
|
||||
VOWELS.concat(VOWELS.map(l => l.toUpperCase()));
|
||||
// :TODO: create Unicode version of this
|
||||
const VOWELS = [
|
||||
'a', 'e', 'i', 'o', 'u',
|
||||
'A', 'E', 'I', 'O', 'U',
|
||||
];
|
||||
|
||||
const SIMPLE_ELITE_MAP = {
|
||||
'a' : '4',
|
||||
|
|
|
@ -387,13 +387,11 @@ exports.getModule = class UploadModule extends MenuModule {
|
|||
self.client.log.error(
|
||||
'Failed moving physical upload file', { error : err.message, fileName : newEntry.fileName, source : src, dest : dst }
|
||||
);
|
||||
|
||||
if(!err && dst !== finalPath) {
|
||||
// name changed; ajust before persist
|
||||
newEntry.fileName = paths.basename(finalPath);
|
||||
}
|
||||
|
||||
return nextEntry(null); // still try next file
|
||||
} else if(dst !== finalPath)
|
||||
{
|
||||
// name changed; adjust before persist
|
||||
newEntry.fileName = paths.basename(finalPath);
|
||||
}
|
||||
|
||||
self.client.log.debug('Moved upload to area', { path : finalPath } );
|
||||
|
|
|
@ -219,7 +219,7 @@ function ViewController(options) {
|
|||
break;
|
||||
|
||||
default :
|
||||
propValue = propValue = conf[propName];
|
||||
propValue = conf[propName];
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
|
|
Loading…
Reference in New Issue