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/admin/yaml_util.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'internal/admin/yaml_util.go') diff --git a/internal/admin/yaml_util.go b/internal/admin/yaml_util.go index c042248..44712a3 100644 --- a/internal/admin/yaml_util.go +++ b/internal/admin/yaml_util.go @@ -9,6 +9,8 @@ import ( "strings" "gopkg.in/yaml.v3" + + "thehouseoficarus/internal/persistence" ) func readYAMLFile(dataDir, subdir, id string) ([]byte, string, error) { @@ -35,7 +37,7 @@ func writeYAMLFile(path string, data any) ([]byte, error) { if err != nil { return nil, err } - if err := os.WriteFile(path, content, 0644); err != nil { + if err := persistence.WriteFile(path, content, 0644); err != nil { return nil, err } return content, nil @@ -338,6 +340,7 @@ func deleteEntityDir(dataDir, subdir, dir string) ([]ChangeDesc, error) { Description: fmt.Sprintf("delete directory %s/%s", subdir, dir), FilePath: srcDir, IsDelete: true, + IsDirDelete: true, }) return changes, nil -- cgit v1.2.3