Always rename attachment title when using Rename File from Parent Metadata
This commit is contained in:
parent
2a3b5593b7
commit
6059bf0e1b
1 changed files with 2 additions and 7 deletions
|
@ -3046,9 +3046,6 @@ var ZoteroPane = new function()
|
|||
continue;
|
||||
}
|
||||
|
||||
// If the attachment title was the same as the filename, change it too
|
||||
var renameTitle = item.getField('title') == file.leafName;
|
||||
|
||||
var parentItemID = item.getSource();
|
||||
var newName = Zotero.Attachments.getFileBaseNameFromItem(parentItemID);
|
||||
|
||||
|
@ -3063,10 +3060,8 @@ var ZoteroPane = new function()
|
|||
continue;
|
||||
}
|
||||
|
||||
if (renameTitle) {
|
||||
item.setField('title', newName);
|
||||
item.save();
|
||||
}
|
||||
item.setField('title', newName);
|
||||
item.save();
|
||||
}
|
||||
|
||||
return true;
|
||||
|
|
Loading…
Add table
Reference in a new issue