fix linux datapath

This commit is contained in:
Zack Rauen 2020-07-27 12:56:29 -04:00
parent 00dc404503
commit c2b1a5c17a
2 changed files with 31 additions and 1 deletions

30
.travis.yml Normal file
View File

@ -0,0 +1,30 @@
language: node_js
node_js:
- "node"
git:
autocrlf: true
branches:
only:
- master
install:
- npm install
script:
- npm run deploy
- npm run test
- npm run lint
deploy:
provider: pages
skip_cleanup: true
github_token: $TRAVIS_ACCESS
keep_history: true
local_dir: .
name: BetterDiscord Deployment
target_branch: gh-pages
on:
branch: master

View File

@ -8,7 +8,7 @@ const releaseChannel = DiscordNative.globals ? DiscordNative.globals.releaseChan
let dataPath = "";
if (process.platform === "win32") dataPath = process.env.APPDATA;
else if (process.platform === "darwin") dataPath = path.join(process.env.HOME, "Library", "Preferences");
else dataPath = path.join(process.env.XDG_CONFIG_HOME ? process.env.XDG_CONFIG_HOME : process.env.HOME, ".config");
else dataPath = process.env.XDG_CONFIG_HOME ? process.env.XDG_CONFIG_HOME : path.join(process.env.HOME, ".config");
dataPath = path.join(dataPath, "BetterDiscord");
export default new class DataStore {