From 9d330206ed3da20ef8104600476d1c20db952af5 Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Sat, 21 Mar 2020 00:53:14 -0400 Subject: [PATCH] Remove unnecessary part of 58c2e38ec2 getAllAddons() waits for extensions to be initialized, so the code in Prefs::loadExtensionDefaults() to delete an extensions.json with an AppTranslocation path should be sufficient, and it shouldn't be necessary to check for it after showing the AppTranslocation startup error. --- chrome/content/zotero/xpcom/zotero.js | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) diff --git a/chrome/content/zotero/xpcom/zotero.js b/chrome/content/zotero/xpcom/zotero.js index 9e66e2a825..abf6d75cd0 100644 --- a/chrome/content/zotero/xpcom/zotero.js +++ b/chrome/content/zotero/xpcom/zotero.js @@ -1806,7 +1806,7 @@ Services.scriptloader.loadSubScript("resource://zotero/polyfill.js"); if (Zotero.isMac && OS.Constants.Path.libDir.includes('AppTranslocation')) { let ps = Services.prompt; let buttonFlags = ps.BUTTON_POS_0 * ps.BUTTON_TITLE_IS_STRING; - let index = ps.confirmEx( + ps.confirmEx( null, Zotero.getString('general.error'), Zotero.getString('startupError.startedFromDiskImage1', Zotero.clientName) @@ -1816,21 +1816,6 @@ Services.scriptloader.loadSubScript("resource://zotero/polyfill.js"); Zotero.getString('general.quitApp', Zotero.clientName), null, null, null, {} ); - - // If the integration plugins were installed from the AppTranslocation path, delete - // extensions.json - try { - let file = OS.Path.join(Zotero.Profile.dir, 'extensions.json'); - let json = JSON.parse(Zotero.File.getContents(file)); - if (json.addons.some(x => x.path.includes('AppTranslocation'))) { - file = Zotero.File.pathToFile(file); - file.remove(null); - } - } - catch (e) { - Zotero.logError(e); - } - Zotero.Utilities.Internal.quit(); return false; }