commit ce6a0ecb01790777461ed9a4c69312dc7c1b75ed parent cfc7f3682948263ea6313fd750f8a4f7d5e6a0eb Author: Dan Stillman <dstillman@zotero.org> Date: Sun, 13 Nov 2016 04:50:00 -0500 Tell connector to reinit after moving data directory Diffstat:
| M | chrome/content/zotero/xpcom/ipc.js | | | 5 | +++++ |
| M | chrome/content/zotero/xpcom/zotero.js | | | 4 | ++++ |
2 files changed, 9 insertions(+), 0 deletions(-)
diff --git a/chrome/content/zotero/xpcom/ipc.js b/chrome/content/zotero/xpcom/ipc.js @@ -93,6 +93,11 @@ Zotero.IPC = new function() { // translators Zotero.initComplete(); } + else if (msg == "reinit") { + if (Zotero.isConnector) { + reinit(false, true); + } + } } } diff --git a/chrome/content/zotero/xpcom/zotero.js b/chrome/content/zotero/xpcom/zotero.js @@ -1495,6 +1495,10 @@ Components.utils.import("resource://gre/modules/osfile.jsm"); // Set data directory again Zotero.debug("Using new data directory " + newDir); this._cacheDataDirectory(newDir); + // Tell Zotero for Firefox in connector mode to reload and find the new data directory + if (this.isStandalone) { + Zotero.IPC.broadcast('reinit'); + } // At least the database was copied, but other things failed if (errors.length) {