-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(discord): log files being created on home directory
- Loading branch information
1 parent
d13ccae
commit e203da9
Showing
2 changed files
with
35 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
diff --git a/src/paths.js b/src/paths.js | ||
index 1cc5ca7..d8c71aa 100644 | ||
--- a/src/paths.js | ||
+++ b/src/paths.js | ||
@@ -4,7 +4,7 @@ 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; | ||
@@ -12,6 +12,7 @@ exports.getUserDataVersioned = () => userDataVersioned; | ||
exports.getResources = () => resourcesPath; | ||
exports.getModuleDataPath = () => moduleData; | ||
exports.getInstallPath = () => installPath; | ||
+exports.getLogPath = () => logPath; | ||
|
||
exports.getExeDir = () => exeDir; | ||
|
||
@@ -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 | ||
-}; | ||
\ No newline at end of file | ||
+}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters