From d7685be114652cf13bba2720cc436350ff2e523a Mon Sep 17 00:00:00 2001 From: Ryan Fleury Date: Wed, 5 Aug 2026 14:00:17 -0600 Subject: [PATCH] do not assume non-empty config file destinations are okay if we don't have a config path established - will cause overwrites on 'opens' --- src/raddbg/raddbg_core.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/raddbg/raddbg_core.c b/src/raddbg/raddbg_core.c index d7c4e9f9..261f7afe 100644 --- a/src/raddbg/raddbg_core.c +++ b/src/raddbg/raddbg_core.c @@ -13868,10 +13868,10 @@ rd_frame(void) B32 file_is_okay = 0; { String8 stored_path = (kind == RD_CmdKind_OpenUser ? rd_state->user_path : rd_state->project_path); - file_is_okay = ((file_props.size == 0 && file_props.created == 0) || - str8_match(file_path, stored_path, 0) || - stored_path.size == 0 || - str8_match(str8_prefix(file_data, 9), str8_lit("// raddbg"), 0)); + file_is_okay = (((file_props.size == 0 && file_props.created == 0) || + str8_match(file_path, stored_path, 0) || + stored_path.size == 0) && + (file_data.size == 0 || str8_match(str8_prefix(file_data, 9), str8_lit("// raddbg"), 0))); } //- rjf: determine file's version