Follow symlinks in app/config paths before starting app up

This commit is contained in:
Scott Nonnenberg 2018-06-14 13:39:44 -07:00
parent 5fca44d1b1
commit d5ead799ce
1 changed files with 7 additions and 3 deletions

10
main.js
View File

@ -1,10 +1,14 @@
const path = require('path');
const url = require('url');
const os = require('os');
const fs = require('fs');
const _ = require('lodash');
const pify = require('pify');
const electron = require('electron');
const getRealPath = pify(fs.realpath);
const {
app,
BrowserWindow,
@ -440,9 +444,9 @@ function showAbout() {
// initialization and is ready to create browser windows.
// Some APIs can only be used after this event occurs.
let ready = false;
app.on('ready', () => {
const userDataPath = app.getPath('userData');
const installPath = app.getAppPath();
app.on('ready', async () => {
const userDataPath = await getRealPath(app.getPath('userData'));
const installPath = await getRealPath(app.getAppPath());
if (process.env.NODE_ENV !== 'test' && process.env.NODE_ENV !== 'test-lib') {
installFileHandler({