- Fix sync error when a file of an attachment with tags was in conflict
- Missed file from previous commit
This commit is contained in:
parent
7008fa41cf
commit
9e9f8db1df
|
@ -354,7 +354,7 @@
|
|||
</tooltip>
|
||||
</hbox>
|
||||
<toolbarbutton id="zotero-tb-sync" class="zotero-small-progress-indicator" tooltip="_child"
|
||||
oncommand="Zotero.Sync.Runner.sync()">
|
||||
oncommand="Zotero.Sync.Server.canAutoResetClient = true; Zotero.Sync.Runner.sync()">
|
||||
<tooltip
|
||||
onpopupshowing="ZoteroPane.setLastSyncStatus(this)"
|
||||
noautohide="true">
|
||||
|
|
|
@ -3379,8 +3379,13 @@ Zotero.Item.prototype.diff = function (item, includeMatches, ignoreFields) {
|
|||
|
||||
/**
|
||||
* Returns an unsaved copy of the item
|
||||
*
|
||||
* @param {Boolean} [includePrimary=false]
|
||||
* @param {Zotero.Item} [newItem=null] Target item for clone (used to pass a saved
|
||||
* item for duplicating items with tags)
|
||||
* @param {Boolean} [unsaved=false] Skip properties that require a saved object (e.g., tags)
|
||||
*/
|
||||
Zotero.Item.prototype.clone = function(includePrimary, newItem) {
|
||||
Zotero.Item.prototype.clone = function(includePrimary, newItem, unsaved) {
|
||||
Zotero.debug('Cloning item ' + this.id);
|
||||
|
||||
if (includePrimary && newItem) {
|
||||
|
@ -3521,7 +3526,7 @@ Zotero.Item.prototype.clone = function(includePrimary, newItem) {
|
|||
}
|
||||
}
|
||||
|
||||
if (obj.tags) {
|
||||
if (!unsaved && obj.tags) {
|
||||
for each(var tag in obj.tags) {
|
||||
if (sameLibrary) {
|
||||
newItem.addTagByID(tag.primary.tagID);
|
||||
|
|
|
@ -2375,10 +2375,10 @@ Zotero.Sync.Storage.QueueManager = new function () {
|
|||
var objectPairs = [];
|
||||
for each(var conflict in _conflicts) {
|
||||
var item = Zotero.Items.getByLibraryAndKey(null, conflict.name);
|
||||
var item1 = item.clone();
|
||||
var item1 = item.clone(false, false, true);
|
||||
item1.setField('dateModified',
|
||||
Zotero.Date.dateToSQL(new Date(conflict.localData.modTime * 1000), true));
|
||||
var item2 = item.clone();
|
||||
var item2 = item.clone(false, false, true);
|
||||
item2.setField('dateModified',
|
||||
Zotero.Date.dateToSQL(new Date(conflict.remoteData.modTime * 1000), true));
|
||||
objectPairs.push([item1, item2]);
|
||||
|
@ -2480,6 +2480,7 @@ Zotero.Sync.Storage.Queue = function (name) {
|
|||
Zotero.debug(this.Name + " queue is done");
|
||||
// DEBUG info
|
||||
Zotero.debug("Active requests: " + this.activeRequests);
|
||||
Zotero.debug("Errors:");
|
||||
Zotero.debug(this._errors);
|
||||
|
||||
if (this.activeRequests) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user