Skip to content

Commit

Permalink
Fixing appdata path #158
Browse files Browse the repository at this point in the history
  • Loading branch information
Levminer committed Nov 23, 2021
1 parent f3701c7 commit 249be93
Show file tree
Hide file tree
Showing 8 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion app/application/src/js/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ if (app.isPackaged === false) {
/**
* Get Authme folder path
*/
const folder_path = dev ? path.join(process.env.APPDATA, "Levminer", "Authme Dev") : path.join(process.env.APPDATA, "Levminer", "Authme")
const folder_path = dev ? path.join(app.getPath("appData"), "Levminer", "Authme Dev") : path.join(app.getPath("appData"), "Levminer", "Authme")

/**
* Read settings
Expand Down
2 changes: 1 addition & 1 deletion app/confirm/src/js/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ if (app.isPackaged === false) {
/**
* Get Authme folder path
*/
const folder_path = dev ? path.join(process.env.APPDATA, "Levminer", "Authme Dev") : path.join(process.env.APPDATA, "Levminer", "Authme")
const folder_path = dev ? path.join(app.getPath("appData"), "Levminer", "Authme Dev") : path.join(app.getPath("appData"), "Levminer", "Authme")

/**
* Read settings
Expand Down
2 changes: 1 addition & 1 deletion app/export/src/js/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ let file
/**
* Get Authme folder path
*/
const folder_path = dev ? path.join(process.env.APPDATA, "Levminer", "Authme Dev") : path.join(process.env.APPDATA, "Levminer", "Authme")
const folder_path = dev ? path.join(app.getPath("appData"), "Levminer", "Authme Dev") : path.join(app.getPath("appData"), "Levminer", "Authme")

/**
* Read settings
Expand Down
2 changes: 1 addition & 1 deletion app/import/src/js/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ if (app.isPackaged === false) {
/**
* Get Authme folder path
*/
const folder_path = dev ? path.join(process.env.APPDATA, "Levminer", "Authme Dev") : path.join(process.env.APPDATA, "Levminer", "Authme")
const folder_path = dev ? path.join(app.getPath("appData"), "Levminer", "Authme Dev") : path.join(app.getPath("appData"), "Levminer", "Authme")

/**
* Read settings
Expand Down
2 changes: 1 addition & 1 deletion app/landing/src/js/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ if (app.isPackaged === false) {
/**
* Get Authme folder path
*/
const folder_path = dev ? path.join(process.env.APPDATA, "Levminer", "Authme Dev") : path.join(process.env.APPDATA, "Levminer", "Authme")
const folder_path = dev ? path.join(app.getPath("appData"), "Levminer", "Authme Dev") : path.join(app.getPath("appData"), "Levminer", "Authme")

/**
* Read settings
Expand Down
2 changes: 1 addition & 1 deletion app/settings/src/js/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ if (process.platform !== "win32" && process.platform !== "darwin") {
/**
* Get Authme folder path
*/
const folder_path = dev ? path.join(process.env.APPDATA, "Levminer", "Authme Dev") : path.join(process.env.APPDATA, "Levminer", "Authme")
const folder_path = dev ? path.join(app.getPath("appData"), "Levminer", "Authme Dev") : path.join(app.getPath("appData"), "Levminer", "Authme")

/**
* Read settings
Expand Down
4 changes: 2 additions & 2 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,8 @@ if (number.startsWith("alpha")) {
remote.initialize()

// ? init folders
const full_path = path.join(process.env.APPDATA, "Levminer")
const folder_path = dev ? path.join(process.env.APPDATA, "Levminer", "Authme Dev") : path.join(process.env.APPDATA, "Levminer", "Authme")
const full_path = path.join(app.getPath("appData"), "Levminer")
const folder_path = dev ? path.join(app.getPath("appData"), "Levminer", "Authme Dev") : path.join(app.getPath("appData"), "Levminer", "Authme")

// check if folders exists
if (!fs.existsSync(full_path)) {
Expand Down
2 changes: 1 addition & 1 deletion preload.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ if (app.isPackaged === false) {
/**
* Get Authme folder path
*/
const folder_path = dev ? path.join(process.env.APPDATA, "Levminer", "Authme Dev") : path.join(process.env.APPDATA, "Levminer", "Authme")
const folder_path = dev ? path.join(app.getPath("appData"), "Levminer", "Authme Dev") : path.join(app.getPath("appData"), "Levminer", "Authme")

/**
* Read settings
Expand Down

0 comments on commit 249be93

Please sign in to comment.