From a24f16eb856323c516c10d126f506678c4d45dd9 Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Sun, 13 Aug 2017 03:26:23 +0200 Subject: [PATCH] Don't look up library name for each downloaded file --- chrome/content/zotero/xpcom/sync/syncRunner.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/chrome/content/zotero/xpcom/sync/syncRunner.js b/chrome/content/zotero/xpcom/sync/syncRunner.js index c93abcfa47..cbd098a7fd 100644 --- a/chrome/content/zotero/xpcom/sync/syncRunner.js +++ b/chrome/content/zotero/xpcom/sync/syncRunner.js @@ -612,10 +612,9 @@ Zotero.Sync.Runner_Module = function (options = {}) { var resyncLibraries = [] for (let libraryID of libraries) { _stopCheck(); + let libraryName = Zotero.Libraries.get(libraryID).name; this.setSyncStatus( - Zotero.getString( - 'sync.status.syncingFilesInLibrary', Zotero.Libraries.get(libraryID).name - ) + Zotero.getString('sync.status.syncingFilesInLibrary', libraryName) ); try { let opts = { @@ -624,7 +623,7 @@ Zotero.Sync.Runner_Module = function (options = {}) { this.setSyncStatus( Zotero.getString( 'sync.status.syncingFilesInLibraryWithRemaining', - [Zotero.Libraries.get(libraryID).name, remaining], + [libraryName, remaining], remaining ) );