Skip to content

Commit

Permalink
Sets default paths on Linux (#1429)
Browse files Browse the repository at this point in the history
  • Loading branch information
adamtajti authored Sep 7, 2024
1 parent f252d56 commit bf60947
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
7 changes: 4 additions & 3 deletions main/src/host-files/GameConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,12 @@ import type { ServerEvents } from '../server'

const POSSIBLE_PATH =
(process.platform === 'win32') ? [
path.join(app.getPath('documents'), 'My Games', 'Path of Exile', 'production_Config.ini')
path.join(app.getPath('documents'), 'My Games\\Path of Exile\\production_Config.ini')
] : (process.platform === 'linux') ? [
// TODO
path.join(app.getPath('documents'), 'My Games/Path of Exile/production_Config.ini'),
path.join(app.getPath('home'), '.local/share/Steam/steamapps/compatdata/238960/pfx/drive_c/users/steamuser/Documents/My Games/Path of Exile/production_Config.ini')
] : (process.platform === 'darwin') ? [
path.join(app.getPath('appData'), 'Path of Exile', 'Preferences', 'production_Config.ini')
path.join(app.getPath('appData'), 'Path of Exile/Preferences/production_Config.ini')
] : []

export class GameConfig {
Expand Down
6 changes: 4 additions & 2 deletions main/src/host-files/GameLogWatcher.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { promises as fs, watchFile, unwatchFile } from 'fs'
import path from 'path'
import { app } from 'electron'
import { guessFileLocation } from './utils'
import { ServerEvents } from '../server'
Expand All @@ -9,9 +10,10 @@ const POSSIBLE_PATH =
'C:\\Program Files (x86)\\Grinding Gear Games\\Path of Exile\\logs\\Client.txt',
'C:\\Program Files (x86)\\Steam\\steamapps\\common\\Path of Exile\\logs\\Client.txt'
] : (process.platform === 'linux') ? [
// TODO
path.join(app.getPath('home'), '.wine/drive_c/Program Files (x86)/Grinding Gear Games/Path of Exile/logs/Client.txt'),
path.join(app.getPath('home'), '.local/share/Steam/steamapps/common/Path of Exile/logs/Client.txt')
] : (process.platform === 'darwin') ? [
`${app.getPath('home')}/Library/Caches/com.GGG.PathOfExile/Logs/Client.txt`
path.join(app.getPath('home'), 'Library/Caches/com.GGG.PathOfExile/Logs/Client.txt')
] : []

export class GameLogWatcher {
Expand Down

0 comments on commit bf60947

Please sign in to comment.