From bbab1b1252bb855b83f4b7b072e9f4a0be86214f Mon Sep 17 00:00:00 2001 From: thelolagemann <15960568+thelolagemann@users.noreply.github.com> Date: Thu, 12 Dec 2024 06:55:15 +0000 Subject: [PATCH] handle unmounted cfg --- server/main.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/server/main.go b/server/main.go index e96d54a..0ace720 100644 --- a/server/main.go +++ b/server/main.go @@ -232,7 +232,10 @@ type config struct { func openConfig() (*config, error){ f, err := os.Open(configLocation) if err != nil { - return nil, err + f, err = os.Open("/usr/local/bin/config.json") + if err != nil { + return nil, err + } } b, err := io.ReadAll(f) if err != nil {