Skip to content

TagSpaces is an offline, open source, document manager with tagging support

adjusting startup parameters

uggrock99338ee86a97
diff --git a/data/electron/main.js b/data/electron/main.js
index 8ecea6da1..f19202110 100644
--- a/data/electron/main.js
+++ b/data/electron/main.js
@@ -10,11 +10,11 @@ var startupFilePath;
//handling start parameter
//console.log(JSON.stringify(process.argv));
process.argv.forEach(function(arg, count) {
- if (arg.toLowerCase() === '-d' || arg.toLowerCase() === '-debug') {
+ if (arg.toLowerCase() === '-d' || arg.toLowerCase() === '--debug') {
debugMode = true;
- } else if (arg.toLowerCase() === '-p' || arg.toLowerCase() === '-portable') {
+ } else if (arg.toLowerCase() === '-p' || arg.toLowerCase() === '--portable') {
app.setPath('userData', 'tsprofile'); // making the app portable
- } else if (arg === '.' || count === 0) {
+ } else if (arg === '.' || count === 0) { // ignoring the first argument
//Ignore these argument
} else if (arg.length > 2) {
console.log("Opening file: " + arg);
@@ -53,6 +53,12 @@ app.on('ready', function() {
mainWindow.webContents.openDevTools();
}
+ var webContents = mainWindow.webContents;
+
+ webContents.on('crash', function() {
+ console.log("WebContent crashed");
+ })
+
// Emitted when the window is closed.
mainWindow.on('closed', function() {
// Dereference the window object, usually you would store windows