diff --git a/components/zotero-service.js b/components/zotero-service.js index 68154b683d..1c955363d7 100644 --- a/components/zotero-service.js +++ b/components/zotero-service.js @@ -494,6 +494,12 @@ ZoteroCommandLineHandler.prototype = { else if (cmdLine.handleFlag("ZoteroDebugText", false)) { zInitOptions.forceDebugLog = 1; } + // Pressing Ctrl-C via the terminal is interpreted as a crash, and after three crashes + // Firefox starts up in automatic safe mode. To avoid this, we clear the crash counter when + // using one of the debug-logging flags, which generally imply terminal usage. + if (zInitOptions.forceDebugLog) { + Services.prefs.getBranch("toolkit.startup.").clearUserPref('recent_crashes'); + } zInitOptions.forceDataDir = cmdLine.handleFlagWithParam("datadir", false);