From bcd58a159be154e3211868aea7bf3eec66ab21a5 Mon Sep 17 00:00:00 2001 From: Michael Beardsworth Date: Mon, 30 Dec 2019 10:34:01 -0800 Subject: [PATCH] Correct inverted logic around include prefixes. (#5689) 4d1a9f8d9eab9fc6762e03cd862576965a0c6920 inverted the logic around keeping the include prefix. This change fixes the error. --- src/idl_gen_fbs.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/idl_gen_fbs.cpp b/src/idl_gen_fbs.cpp index ed86d0dec..d3bee62e5 100644 --- a/src/idl_gen_fbs.cpp +++ b/src/idl_gen_fbs.cpp @@ -76,10 +76,10 @@ std::string GenerateFBS(const Parser &parser, const std::string &file_name) { continue; std::string basename; if(parser.opts.keep_include_path) { + basename = flatbuffers::StripExtension(it->second); + } else { basename = flatbuffers::StripPath( flatbuffers::StripExtension(it->second)); - } else { - basename = flatbuffers::StripExtension(it->second); } schema += "include \"" + basename + ".fbs\";\n"; num_includes++;