From 9a8f1ad508d2522653c2bdf3327f191389af8884 Mon Sep 17 00:00:00 2001 From: antelle Date: Tue, 9 Jun 2020 19:26:41 +0200 Subject: [PATCH] fix #1530: running from directories with hash symbols --- desktop/app.js | 5 ++++- release-notes.md | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/desktop/app.js b/desktop/app.js index 90ba284b..e76ce1f0 100644 --- a/desktop/app.js +++ b/desktop/app.js @@ -1,6 +1,7 @@ const electron = require('electron'); const path = require('path'); const fs = require('fs'); +const url = require('url'); let perfTimestamps = global.perfTimestamps; perfTimestamps.push({ name: 'loading app requires', ts: process.hrtime() }); @@ -36,7 +37,9 @@ setUserDataPaths(); let openFile = process.argv.filter((arg) => /\.kdbx$/i.test(arg))[0]; const htmlPath = - (isDev && process.env.KEEWEB_HTML_PATH) || 'file://' + path.join(__dirname, 'index.html'); + (isDev && process.env.KEEWEB_HTML_PATH) || + url.format({ protocol: 'file', slashes: true, pathname: path.join(__dirname, 'index.html') }); + const showDevToolsOnStart = process.argv.some((arg) => arg.startsWith('--devtools')) || process.env.KEEWEB_OPEN_DEVTOOLS === '1'; diff --git a/release-notes.md b/release-notes.md index 08942358..3730add3 100644 --- a/release-notes.md +++ b/release-notes.md @@ -2,6 +2,7 @@ Release notes ------------- ##### v1.15.2 (TBD) `-` fix #1530: recursive creation of the portable directory +`-` fix #1530: running from directories with hash symbols ##### v1.15.1 (2020-06-07) `-` fix #1528: OTP generation for stored values