mirror of
https://github.com/bitwarden/desktop.git
synced 2025-01-22 21:11:28 +01:00
use userData
dir for electron-log
This commit is contained in:
parent
5ee4a8988a
commit
c516cb4f2c
@ -42,12 +42,7 @@ export class Main {
|
|||||||
if (appDataPath != null) {
|
if (appDataPath != null) {
|
||||||
app.setPath('userData', appDataPath);
|
app.setPath('userData', appDataPath);
|
||||||
}
|
}
|
||||||
|
app.setPath('logs', path.join(app.getPath('userData'), 'logs'));
|
||||||
const logsDir = path.join(app.getPath('userData'), 'logs');
|
|
||||||
if (!fs.existsSync(logsDir)) {
|
|
||||||
fs.mkdirSync(logsDir);
|
|
||||||
}
|
|
||||||
app.setPath('logs', logsDir);
|
|
||||||
|
|
||||||
const args = process.argv.slice(1);
|
const args = process.argv.slice(1);
|
||||||
const watch = args.some((val) => val === '--watch');
|
const watch = args.some((val) => val === '--watch');
|
||||||
@ -57,7 +52,7 @@ export class Main {
|
|||||||
require('electron-reload')(__dirname, {});
|
require('electron-reload')(__dirname, {});
|
||||||
}
|
}
|
||||||
|
|
||||||
this.logService = new LogService(null, app.getPath('logs'));
|
this.logService = new LogService(null, app.getPath('userData'));
|
||||||
this.i18nService = new I18nService('en', './locales/');
|
this.i18nService = new I18nService('en', './locales/');
|
||||||
this.storageService = new DesktopStorageService();
|
this.storageService = new DesktopStorageService();
|
||||||
this.messagingService = new DesktopMainMessagingService(this);
|
this.messagingService = new DesktopMainMessagingService(this);
|
||||||
|
Loading…
Reference in New Issue
Block a user