Skip to content

Commit

Permalink
fix: log path not set (#203)
Browse files Browse the repository at this point in the history
Fixes #202
  • Loading branch information
diogotcorreia authored Jan 20, 2025
1 parent 4ed9e52 commit e88eebf
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/paths.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,15 @@ const { app } = require('electron');

const buildInfo = require('./utils/buildInfo');

let userData, userDataVersioned, resourcesPath, moduleData, exeDir, installPath;
let userData, userDataVersioned, resourcesPath, moduleData, exeDir, installPath, logPath;

exports.getUserData = () => userData;
exports.getUserDataVersioned = () => userDataVersioned;

exports.getResources = () => resourcesPath;
exports.getModuleDataPath = () => moduleData;
exports.getInstallPath = () => installPath;
exports.getLogPath = () => logPath;

exports.getExeDir = () => exeDir;

Expand All @@ -26,7 +27,9 @@ exports.init = () => {

moduleData = buildInfo.newUpdater ? join(userData, 'module_data') : join(userDataVersioned, 'modules');
resourcesPath = join(process.resourcesPath);
logPath = join(userData, 'logs');

global.moduleDataPath = moduleData; // Global because discord
global.logPath = logPath; // Global because discord
app.setPath('userData', userData); // Set userData properly because electron
};

0 comments on commit e88eebf

Please sign in to comment.