aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBradley Lewis <22850972+BradLewis@users.noreply.github.com>2026-02-13 12:23:31 +1100
committerGitHub <noreply@github.com>2026-02-13 12:23:31 +1100
commitd828854b608c184077dfef15e447b4c952f01406 (patch)
tree020defb1a912852eac06e3cb1ce7d2c2e4036c12
parent4cc9318992f394a9334add3fb83445561511b340 (diff)
parentc73b4f91322e742e019c60715e62b26424f3d877 (diff)
Merge pull request #1299 from BradLewis/fix/os-port-mistakes
Fix error checking mistakes from porting to new os package
-rw-r--r--src/odin/format/format.odin4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/odin/format/format.odin b/src/odin/format/format.odin
index 352b2a5..9b32721 100644
--- a/src/odin/format/format.odin
+++ b/src/odin/format/format.odin
@@ -28,7 +28,7 @@ find_config_file_or_default :: proc(path: string) -> printer.Config {
config := default_style
if os.exists(name) {
- if data, err := os.read_entire_file(name, context.temp_allocator); err != nil {
+ if data, err := os.read_entire_file(name, context.temp_allocator); err == nil {
if json.unmarshal(data, &config) == nil {
found = true
}
@@ -59,7 +59,7 @@ read_config_file_from_path_or_default :: proc(config_path: string) -> printer.Co
}
config := default_style
if os.exists(path) {
- if data, err := os.read_entire_file(path, context.temp_allocator); err != nil {
+ if data, err := os.read_entire_file(path, context.temp_allocator); err == nil {
if json.unmarshal(data, &config) == nil {
return config
}