mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-14 16:36:55 +00:00
Terminate the output directory argument of flatc.
Given the command flatc -o . -c test.fbs it would generate header file .test_generated.h rather than ./test_generated.h This fixes this issue. Tested: Manually verified that flatc generates the correct output files given output paths ending with and without '/' on Linux and Windows. Bug: 16464827 Change-Id: I854cb881286f22690f1885f942cf3fd2fc59ca8d
This commit is contained in:
@@ -25,6 +25,13 @@
|
||||
|
||||
namespace flatbuffers {
|
||||
|
||||
static const char kPosixPathSeparator = '/';
|
||||
#ifdef _WIN32
|
||||
static const char kPathSeparator = '\\';
|
||||
#else
|
||||
static const char kPathSeparator = kPosixPathSeparator;
|
||||
#endif // _WIN32
|
||||
|
||||
// Convert an integer or floating point value to a string.
|
||||
// In contrast to std::stringstream, "char" values are
|
||||
// converted to a string of digits.
|
||||
|
||||
Reference in New Issue
Block a user