diff --git a/chrome/content/zotero/xpcom/utilities_internal.js b/chrome/content/zotero/xpcom/utilities_internal.js index 353d104141..1c68b31d58 100644 --- 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 index 8638acee0f..4a8eb226f1 100644 --- 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);