From 302193a814ffcf12fa2a5c394ce2ce85e6c49250 Mon Sep 17 00:00:00 2001 From: GriffinR Date: Fri, 13 Sep 2024 23:40:00 -0400 Subject: [PATCH] Have scaninc ignore non-existing files --- tools/scaninc/scaninc.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tools/scaninc/scaninc.cpp b/tools/scaninc/scaninc.cpp index f5ee7ad6deeb..c1b7987a5a4c 100644 --- a/tools/scaninc/scaninc.cpp +++ b/tools/scaninc/scaninc.cpp @@ -125,7 +125,12 @@ int main(int argc, char **argv) if (!exists && (file.FileType() == SourceFileType::Asm || file.FileType() == SourceFileType::Inc)) { path = include; + if (CanOpenFile(path)) + exists = true; } + if (!exists) + continue; + dependencies_includes.insert(path); bool inserted = dependencies.insert(path).second; if (inserted && exists)