Always rename attachment title when using Rename File from Parent Metadata

This commit is contained in:
Dan Stillman 2009-11-23 06:58:52 +00:00
parent 2a3b5593b7
commit 6059bf0e1b

View file

@ -3046,9 +3046,6 @@ var ZoteroPane = new function()
continue; 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 parentItemID = item.getSource();
var newName = Zotero.Attachments.getFileBaseNameFromItem(parentItemID); var newName = Zotero.Attachments.getFileBaseNameFromItem(parentItemID);
@ -3063,10 +3060,8 @@ var ZoteroPane = new function()
continue; continue;
} }
if (renameTitle) { item.setField('title', newName);
item.setField('title', newName); item.save();
item.save();
}
} }
return true; return true;