From 87d08f0151e643951769e323995f1c5ed89ee200 Mon Sep 17 00:00:00 2001 From: historia <[not public]> Date: Fri, 18 Sep 2026 01:50:17 -0400 Subject: fix: harden economy recovery, shutdown concurrency, world validation, and inventory-loss paths --- internal/cardart/store.go | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'internal/cardart') diff --git a/internal/cardart/store.go b/internal/cardart/store.go index 7e9b263..1a3621f 100644 --- a/internal/cardart/store.go +++ b/internal/cardart/store.go @@ -3,6 +3,7 @@ package cardart import ( + "fmt" "os" "gopkg.in/yaml.v3" @@ -15,9 +16,15 @@ type Store struct { func Load(path string) *Store { store := &Store{Cards: make(map[string]map[int][]string)} data, err := os.ReadFile(path) - if err != nil || yaml.Unmarshal(data, store) != nil { + if err != nil { + if !os.IsNotExist(err) { + fmt.Fprintf(os.Stderr, "cardart: read %s: %v\n", path, err) + } return store } + if err := yaml.Unmarshal(data, store); err != nil { + fmt.Fprintf(os.Stderr, "cardart: parse %s: %v\n", path, err) + } return store } -- cgit v1.2.3