Skip to content

Commit

Permalink
shared: don't bake in HOME at compile time (you nitwit)
Browse files Browse the repository at this point in the history
  • Loading branch information
niv committed Sep 17, 2017
1 parent 28934ab commit 6548751
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/lib/shared.nim
Original file line number Diff line number Diff line change
Expand Up @@ -93,11 +93,11 @@ proc findNwnRoot*(): string =
result = $Args["--root"]
else:
when defined(macosx):
const settingsFile = r"~/Library/Application Support/Beamdog Client/settings.json".expandTilde
let settingsFile = r"~/Library/Application Support/Beamdog Client/settings.json".expandTilde
elif defined(linux):
const settingsFile = r"~/.config/Beamdog Client/settings.json".expandTilde
let settingsFile = r"~/.config/Beamdog Client/settings.json".expandTilde
elif defined(windows):
const settingsFile = getHomeDir() / r"AppData\Roaming\Beamdog Client\settings.json"
let settingsFile = getHomeDir() / r"AppData\Roaming\Beamdog Client\settings.json"
else: {.fatal: "Unsupported os for findNwnRoot"}

let data = readFile(settingsFile)
Expand Down

0 comments on commit 6548751

Please sign in to comment.