Modifying an attachment with a missing file and then performing a storage sync would erase the attachment path on the sync server

This commit is contained in:
Dan Stillman 2009-03-04 02:38:57 +00:00
parent c781705793
commit 7edfd0aa03

View File

@ -3629,12 +3629,10 @@ Zotero.Item.prototype.serialize = function(mode) {
if (this.isAttachment()) {
arr.attachment = {};
arr.attachment.linkMode = this.attachmentLinkMode;
var file = this.getFile();
arr.attachment.mimeType = this.attachmentMIMEType;
var charsetID = this.attachmentCharset;
arr.attachment.charset = Zotero.CharacterSets.getName(charsetID);
arr.attachment.path = file ?
Zotero.Attachments.getPath(file, arr.attachment.linkMode) : '';
arr.attachment.path = this.attachmentPath;
}
arr.note = this.getNote();