Skip to content

Commit

Permalink
fix build with boost 1.87
Browse files Browse the repository at this point in the history
  • Loading branch information
landryb committed Nov 21, 2024
1 parent 764157d commit 25cc162
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 20 deletions.
2 changes: 1 addition & 1 deletion libgnucash/app-utils/gnc-quotes.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ GncFQQuoteSource::run_cmd (const StrVec& args, const std::string& json_string) c
try
{
std::future<std::vector<char> > out_buf, err_buf;
boost::asio::io_service svc;
boost::asio::io_context svc;

auto input_buf = bp::buffer (json_string);
bp::child process;
Expand Down
24 changes: 5 additions & 19 deletions libgnucash/core-utils/gnc-filepath-utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@
#endif

#include "gnc-locale-utils.hpp"
#include <filesystem>
#include <boost/filesystem.hpp>
#include <boost/locale.hpp>
#include <regex>
Expand Down Expand Up @@ -444,26 +445,11 @@ copy_recursive(const bfs::path& src, const bfs::path& dest)
auto old_len = old_str.size();
try
{
/* Note: the for(auto elem : iterator) construct fails
* on travis (g++ 4.8.x, boost 1.54) so I'm using
* a traditional for loop here */
for(auto direntry = bfs::recursive_directory_iterator(src);
direntry != bfs::recursive_directory_iterator(); ++direntry)
{
#ifdef G_OS_WIN32
string cur_str = direntry->path().wstring();
#else
string cur_str = direntry->path().string();
#endif
auto cur_len = cur_str.size();
string rel_str(cur_str, old_len, cur_len - old_len);
bfs::path relpath(rel_str, cvt);
auto newpath = bfs::absolute (relpath.relative_path(), dest);
newpath.imbue(bfs_locale);
bfs::copy(direntry->path(), newpath);
}
std::filesystem::copy (std::filesystem::path(old_str),
std::filesystem::path(dest.string()),
std::filesystem::copy_options::recursive);
}
catch(const bfs::filesystem_error& ex)
catch(const std::filesystem::filesystem_error& ex)
{
g_warning("An error occurred while trying to migrate the user configation from\n%s to\n%s"
"(Error: %s)",
Expand Down

0 comments on commit 25cc162

Please sign in to comment.