mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-03 04:21:13 +00:00
flatc now creates the output directory if it doesn't exist yet.
Also cleaned up the general mkdir functionality. Tested: on OS X. Tested that a command line like: ./flatc -j -o foo/bar/baz tests/monster_test.fbs generates files in foo/bar/baz/MyGame/Example/*.java which previously didn't exist. Windows code was previously tested but has been moved, so needs to be tested again. Change-Id: Iee943121b3be4f92961a3ec94c2cb578165f114a
This commit is contained in:
@@ -838,7 +838,8 @@ bool Parser::Parse(const char *source, const char *filepath) {
|
||||
while (IsNext(kTokenInclude)) {
|
||||
auto name = attribute_;
|
||||
Expect(kTokenStringConstant);
|
||||
name = StripFileName(filepath) + name;
|
||||
auto path = StripFileName(filepath);
|
||||
if (path.length()) name = path + kPathSeparator + name;
|
||||
if (included_files_.find(name) == included_files_.end()) {
|
||||
// We found an include file that we have not parsed yet.
|
||||
// Load it and parse it.
|
||||
|
||||
Reference in New Issue
Block a user