fix: expand tilde in dataDir on windows

lua-history^2
TorchedSammy 2022-07-13 14:10:29 -04:00
parent 2b480e50e6
commit e185a32685
Signed by: sammyette
GPG Key ID: 904FC49417B44DCD
1 changed files with 5 additions and 1 deletions

View File

@ -2,13 +2,17 @@
package main
import (
"hilbish/util"
)
// String vars that are free to be changed at compile time
var (
requirePaths = commonRequirePaths + `.. ';'
.. hilbish.userDir.config .. '\\Hilbish\\libs\\?\\init.lua;'
.. hilbish.userDir.config .. '\\Hilbish\\libs\\?\\?.lua;'
.. hilbish.userDir.config .. '\\Hilbish\\libs\\?.lua;'`
dataDir = "~\\Appdata\\Roaming\\Hilbish" // ~ and \ gonna cry?
dataDir = util.ExpandHome("~\\Appdata\\Roaming\\Hilbish") // ~ and \ gonna cry?
preloadPath = dataDir + "\\nature\\init.lua"
sampleConfPath = dataDir + "\\hilbishrc.lua" // Path to default/sample config
defaultConfDir = ""