commit cfc7f3682948263ea6313fd750f8a4f7d5e6a0eb parent 79700969e15f604f3a05781287468d14d8f1936b Author: Dan Stillman <dstillman@zotero.org> Date: Sat, 12 Nov 2016 22:03:06 -0500 Don't send lockReleased on Standalone restart This prevents Zotero for Firefox from starting up and shutting down when Standalone is just restarting. Diffstat:
| M | chrome/content/zotero/xpcom/utilities_internal.js | | | 3 | +++ |
| M | chrome/content/zotero/xpcom/zotero.js | | | 6 | ++++-- |
2 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/chrome/content/zotero/xpcom/utilities_internal.js b/chrome/content/zotero/xpcom/utilities_internal.js @@ -1179,6 +1179,9 @@ Zotero.Utilities.Internal = { */ quitZotero: function(restart=false) { var startup = Services.startup; + if (restart) { + Zotero.restarting = true; + } startup.quit(startup.eAttemptQuit | (restart ? startup.eRestart : 0) ); } } diff --git a/chrome/content/zotero/xpcom/zotero.js b/chrome/content/zotero/xpcom/zotero.js @@ -861,8 +861,10 @@ Components.utils.import("resource://gre/modules/osfile.jsm"); // close DB yield Zotero.DB.closeDatabase(true) - // broadcast that DB lock has been released - Zotero.IPC.broadcast("lockReleased"); + if (!Zotero.restarting) { + // broadcast that DB lock has been released + Zotero.IPC.broadcast("lockReleased"); + } } } catch(e) { Zotero.logError(e);