Skip to content

Commit

Permalink
Fix bad path calculation when using default output dir for command da…
Browse files Browse the repository at this point in the history
…tabase.

fixes #415
  • Loading branch information
grafikrobot committed Sep 21, 2024
1 parent 3c0f563 commit f3aac5b
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 7 deletions.
5 changes: 5 additions & 0 deletions doc/src/history.adoc
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
[[b2.history]]
= History

== Version 5.3.0

* Fix command database output file path when an output dir is not given.
-- _René Ferdinand Rivera Morell_

== Version 5.2.1

This patch reverts the change to define `_HAS_EXCEPTIONS=0` for Dinkumware
Expand Down
4 changes: 2 additions & 2 deletions src/build/version.jam
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import numbers ;

# Mirror engine JAM_VERSION
.major = 5 ;
.minor = 2 ;
.patch = 1 ;
.minor = 3 ;
.patch = 0 ;


rule build ( )
Expand Down
10 changes: 7 additions & 3 deletions src/engine/mod_command_db.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -124,13 +124,17 @@ struct database
void exit_main(int status)
{
if (status == EXIT_FAIL) return;
std::string filename = output_filename;
std::string filename;
if (!b2::paths::is_rooted(output_filename))
{
if (!b2::paths::is_rooted(output_directory))
filename = b2::cwd_str() + "/";
filename += output_directory + "/" + output_filename;
filename = b2::paths::normalize(filename);
filename = b2::paths::normalize(
filename + output_directory + "/" + output_filename);
}
else
{
filename = b2::paths::normalize(output_filename);
}
if (prop_db->write_file(filename, output_format))
out_printf("...wrote command database '%s'...\n", filename.c_str());
Expand Down
4 changes: 2 additions & 2 deletions src/engine/patchlevel.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@ Distributed under the Boost Software License, Version 1.0.
*/

#define VERSION_MAJOR 5
#define VERSION_MINOR 2
#define VERSION_PATCH 1
#define VERSION_MINOR 3
#define VERSION_PATCH 0

0 comments on commit f3aac5b

Please sign in to comment.