aboutsummaryrefslogtreecommitdiff
path: root/internal/player/store.go
diff options
context:
space:
mode:
authorhistoria <[not public]>2026-09-18 17:48:26 -0400
committerhistoria <[not public]>2026-09-18 17:48:26 -0400
commit8fe9e3c3fef0049df82281a62afe35dda516dfe2 (patch)
treedd269f2c0710f334e19f00a191260ebc46284a90 /internal/player/store.go
parent194164a77eb4f2479b94c19e6f0e1278ab608781 (diff)
downloadthehouseoficarus-8fe9e3c3fef0049df82281a62afe35dda516dfe2.tar.gz
fix: close combat ghost, admin traversal, login throttle, journal double-pay, and quality/economy gaps
Diffstat (limited to 'internal/player/store.go')
-rw-r--r--internal/player/store.go8
1 files changed, 7 insertions, 1 deletions
diff --git a/internal/player/store.go b/internal/player/store.go
index 0b0e70e..5d69ec3 100644
--- a/internal/player/store.go
+++ b/internal/player/store.go
@@ -52,7 +52,13 @@ func writePrivate(path string, data []byte) error {
if err := persistence.WriteFile(path, data, 0600); err != nil {
return err
}
- return os.Chmod(path, 0600)
+ // The file was already renamed into place; a chmod failure is a
+ // post-replacement durability-uncertain condition, not "nothing
+ // happened".
+ if err := os.Chmod(path, 0600); err != nil {
+ return fmt.Errorf("%w: chmod: %v", persistence.ErrDurabilityUncertain, err)
+ }
+ return nil
}
// MarshalAccount serializes an account; callers that own the account (the