From 196e45c849445db5ef491e1ed50d2fddb971cbf0 Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Fri, 27 Oct 2017 04:07:35 -0400 Subject: [PATCH] Fix file conflict resolution after f0770fa84d merge.xul now returns an object with .data and .selected instead of returning .data directly --- chrome/content/zotero/xpcom/collectionTreeView.js | 1 + chrome/content/zotero/xpcom/storage/storageLocal.js | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/chrome/content/zotero/xpcom/collectionTreeView.js b/chrome/content/zotero/xpcom/collectionTreeView.js index bd7e90d33..4b5f0a44a 100644 --- a/chrome/content/zotero/xpcom/collectionTreeView.js +++ b/chrome/content/zotero/xpcom/collectionTreeView.js @@ -2192,6 +2192,7 @@ Zotero.CollectionTreeView.prototype.drop = Zotero.Promise.coroutine(function* (r lastWin.openDialog('chrome://zotero/content/merge.xul', '', 'chrome,modal,centerscreen', io); yield Zotero.DB.executeTransaction(function* () { + // DEBUG: This probably needs to be updated if this starts being used for (let obj of io.dataOut) { yield obj.ref.save(); } diff --git a/chrome/content/zotero/xpcom/storage/storageLocal.js b/chrome/content/zotero/xpcom/storage/storageLocal.js index f37822a77..74cd5f44d 100644 --- a/chrome/content/zotero/xpcom/storage/storageLocal.js +++ b/chrome/content/zotero/xpcom/storage/storageLocal.js @@ -1026,11 +1026,12 @@ Zotero.Sync.Storage.Local = { if (!io.dataOut) { return false; } + yield Zotero.DB.executeTransaction(function* () { for (let i = 0; i < conflicts.length; i++) { let conflict = conflicts[i]; let item = Zotero.Items.getByLibraryAndKey(libraryID, conflict.left.key); - let mtime = io.dataOut[i].dateModified; + let mtime = io.dataOut[i].data.dateModified; // Local if (mtime == conflict.left.dateModified) { syncState = this.SYNC_STATE_FORCE_UPLOAD;