Fixed .proto not being accepted as schema file.

Change-Id: I1ccd52a847930fa636d24f9490d57577b8775d08
This commit is contained in:
Wouter van Oortmerssen
2017-09-12 11:36:38 -07:00
parent 5fa00630af
commit 1d444f63d3

View File

@@ -292,7 +292,8 @@ int FlatCompiler::Compile(int argc, const char** argv) {
bool is_binary = static_cast<size_t>(file_it - filenames.begin()) >=
binary_files_from;
auto is_schema = flatbuffers::GetExtension(filename) == "fbs";
auto ext = flatbuffers::GetExtension(filename);
auto is_schema = ext == "fbs" || ext == "proto";
if (is_binary) {
parser->builder_.Clear();
parser->builder_.PushFlatBuffer(