Skip to content

Commit 1a10fda

Browse files
committed
* Fixed issue #74: Invalid generated output file name: index.cpptml.cpp.
1 parent 13e34f3 commit 1a10fda

File tree

3 files changed

+3
-77
lines changed

3 files changed

+3
-77
lines changed

CHANGES

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ Changes for 3.1.0:
44
* Fixed issue #63: Context class redesign. Move arguments handling into a Context class.
55
* Fixed issue #64: Remove build artifacts of samples from installation packages.
66
* Fixed issue #72: Move the code FileManager class generation code into its own IGenerator implementation.
7+
* Fixed issue #74: Invalid generated output file name: index.cpptml.cpp.
78

89

910
Changes for 3.0.1:

samples/demo_website/www/index.html.old

Lines changed: 0 additions & 74 deletions
This file was deleted.

src/bin2cpp/main.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -564,9 +564,8 @@ APP_ERROR_CODES processInputFile(const Context & c, bin2cpp::IGenerator * genera
564564
return APP_ERROR_INPUTFILENOTFOUND;
565565

566566
//prepare output files path
567-
std::string cppFilename = c.headerFilename;
568-
ra::strings::Replace(cppFilename, ".hpp", ".cpp");
569-
ra::strings::Replace(cppFilename, ".h", ".cpp");
567+
std::string headerExtention = ra::filesystem::GetFileExtention(c.headerFilename);
568+
std::string cppFilename = c.headerFilename.substr(0, c.headerFilename.size() - headerExtention.size()) + "cpp"; // strip out header file's extension and add 'cpp'.
570569

571570
//create a copy of the context.
572571
//we may have already generated files from a previous call to processInputFile().

0 commit comments

Comments
 (0)