mirror of
https://github.com/OpenFactorioServerManager/factorio-server-manager.git
synced 2025-03-17 21:07:54 +02:00
Fix file path to factorio-current.log on windows.
This commit is contained in:
parent
d788b25a74
commit
c1b31fa8af
@ -8,6 +8,7 @@ import (
|
||||
"net/http"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"runtime"
|
||||
)
|
||||
|
||||
type Config struct {
|
||||
@ -69,8 +70,14 @@ func parseFlags() {
|
||||
config.FactorioModsDir = filepath.Join(config.FactorioDir, "mods")
|
||||
config.FactorioConfigFile = filepath.Join(config.FactorioDir, *factorioConfigFile)
|
||||
config.FactorioBinary = filepath.Join(config.FactorioDir, *factorioBinary)
|
||||
config.FactorioLog = filepath.Join(config.FactorioDir, "factorio-current.log")
|
||||
config.MaxUploadSize = *factorioMaxUpload
|
||||
|
||||
if runtime.GOOS == "windows" {
|
||||
appdata := os.Getenv("APPDATA")
|
||||
config.FactorioLog = filepath.Join(appdata, "Factorio", "factorio-current.log")
|
||||
} else {
|
||||
config.FactorioLog = filepath.Join(config.FactorioDir, "factorio-current.log")
|
||||
}
|
||||
}
|
||||
|
||||
func main() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user