Add user path to logging exceptions

This commit is contained in:
Fedor Indutny 2021-06-01 11:15:23 -07:00 committed by GitHub
parent 0e19c17160
commit 33595646c1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 60 additions and 41 deletions

View file

@ -19,7 +19,7 @@ const electron = require('electron');
const packageJson = require('./package.json');
const GlobalErrors = require('./app/global_errors');
const { setup: setupSpellChecker } = require('./app/spell_check');
const { redactAll } = require('./js/modules/privacy');
const { redactAll, addSensitivePath } = require('./ts/util/privacy');
const removeUserConfig = require('./app/user_config').remove;
GlobalErrors.addHandler();
@ -1163,6 +1163,8 @@ app.on('ready', async () => {
const userDataPath = await getRealPath(app.getPath('userData'));
const installPath = await getRealPath(app.getAppPath());
addSensitivePath(userDataPath);
if (process.env.NODE_ENV !== 'test' && process.env.NODE_ENV !== 'test-lib') {
installFileHandler({
protocol: electronProtocol,