aboutsummaryrefslogtreecommitdiff
path: root/src/check_builtin.cpp
diff options
context:
space:
mode:
authorgingerBill <bill@gingerbill.org>2024-05-20 15:54:53 +0100
committergingerBill <bill@gingerbill.org>2024-05-20 15:54:53 +0100
commit856537f0ce11bd0e966fc6647b949fc99373ef29 (patch)
tree7305ce21cfaa4f62f2c0f7f70fd5e325ebbc9fdb /src/check_builtin.cpp
parentbc706f8b0c18f90dca0cdd664ebb82e8a4305fa3 (diff)
Fix #3603
Diffstat (limited to 'src/check_builtin.cpp')
-rw-r--r--src/check_builtin.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/check_builtin.cpp b/src/check_builtin.cpp
index 5400f83f6..d85e94db3 100644
--- a/src/check_builtin.cpp
+++ b/src/check_builtin.cpp
@@ -1092,7 +1092,13 @@ gb_internal bool cache_load_file_directive(CheckerContext *c, Ast *call, String
BlockingMutex *ignore_mutex = nullptr;
bool ok = determine_path_from_string(ignore_mutex, call, base_dir, original_string, &path);
- gb_unused(ok);
+ if (!ok) {
+ if (err_on_not_found) {
+ error(ce->proc, "Failed to `#%.*s` file: %.*s; invalid file or cannot be found", LIT(builtin_name), LIT(original_string));
+ }
+ call->state_flags |= StateFlag_DirectiveWasFalse;
+ return false;
+ }
}
MUTEX_GUARD(&c->info->load_file_mutex);