Skip to content

Commit

Permalink
chg: Fixing code to handle HOME/USERPROFILE
Browse files Browse the repository at this point in the history
del: package-lock.json goes away in favor of yarn
  • Loading branch information
itssimple committed May 13, 2018
1 parent 4dd10d2 commit 64ee5bb
Show file tree
Hide file tree
Showing 6 changed files with 1,868 additions and 1,292 deletions.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
.vscode
.idea
npm-debug.log
node_modules/
node_modules/
*.tgz
dist/
7 changes: 4 additions & 3 deletions edj.filereader.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,9 +99,10 @@ edj = {
if (typeof process !== 'undefined' && edjApp.is_electron) {
const fs = require('fs');
if (edjApp.is_windows) {
const userProfile = `${process.env.HOME}\\Saved Games\\Frontier Developments\\Elite Dangerous\\`;
edj.profileDir = userProfile;
fs.readdir(userProfile, (err, files) => {
const userProfile = (typeof process.env.HOME !== 'undefined' ? process.env.HOME : process.env.USERPROFILE);
const journalFolder = `${userProfile}\\Saved Games\\Frontier Developments\\Elite Dangerous\\`;
edj.profileDir = journalFolder;
fs.readdir(journalFolder, (err, files) => {
edj.selDir = files;
});
}
Expand Down
Loading

0 comments on commit 64ee5bb

Please sign in to comment.