don't download snapshots when snapshot is given as a document object and automaticSnapshots preference is false

This commit is contained in:
Simon Kornblith 2008-12-21 18:16:31 +00:00
parent 574e6197a2
commit f5fb1fa806

View file

@ -1410,10 +1410,12 @@ Zotero.Translate.prototype._itemDone = function(item, attachedTo) {
// if snapshot is not explicitly set to false, retrieve snapshot
if(attachment.document) {
try {
Zotero.Attachments.importFromDocument(attachment.document, myID, attachment.title);
} catch(e) {
Zotero.debug("Translate: Error attaching document", 2);
if(automaticSnapshots) {
try {
Zotero.Attachments.importFromDocument(attachment.document, myID, attachment.title);
} catch(e) {
Zotero.debug("Translate: Error attaching document", 2);
}
}
// Save attachment if snapshot pref enabled or not HTML
// (in which case downloadAssociatedFiles applies)