Updates to oputil when --update with desc/descLong
This commit is contained in:
parent
15ee869fd9
commit
5cbbd76411
|
@ -172,10 +172,10 @@ function scanFileAreaForChanges(areaInfo, options, cb) {
|
||||||
//
|
//
|
||||||
// We'll update the entry if the following conditions are met:
|
// We'll update the entry if the following conditions are met:
|
||||||
// * We have a single duplicate, and:
|
// * We have a single duplicate, and:
|
||||||
// * --update-desc was passed or the existing entry's desc or
|
// * --update was passed or the existing entry's desc or
|
||||||
// longDesc are blank/empty
|
// longDesc are blank/empty
|
||||||
//
|
//
|
||||||
if(argv['update'] && 1 === dupeEntries.length) {
|
if(argv.update && 1 === dupeEntries.length) {
|
||||||
const FileEntry = require('../../core/file_entry.js');
|
const FileEntry = require('../../core/file_entry.js');
|
||||||
const existingEntry = new FileEntry();
|
const existingEntry = new FileEntry();
|
||||||
|
|
||||||
|
@ -200,6 +200,8 @@ function scanFileAreaForChanges(areaInfo, options, cb) {
|
||||||
}
|
}
|
||||||
|
|
||||||
console.info('Dupe (updating)');
|
console.info('Dupe (updating)');
|
||||||
|
existingEntry.desc = fileEntry.desc;
|
||||||
|
existingEntry.descLong = fileEntry.descLong;
|
||||||
updateTags(existingEntry);
|
updateTags(existingEntry);
|
||||||
|
|
||||||
finalizeEntryAndPersist(true, existingEntry, descHandler, err => {
|
finalizeEntryAndPersist(true, existingEntry, descHandler, err => {
|
||||||
|
|
Loading…
Reference in New Issue