Skip to content

Commit

Permalink
Fix build on Boost 1.81 (espressomd#4655)
Browse files Browse the repository at this point in the history
Description of changes:
- Replace file copy option that was deprecated in Boost 1.81
  • Loading branch information
kodiakhq[bot] authored and jngrad committed Mar 1, 2023
1 parent d54012e commit fac515d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/core/io/writer/h5md_core.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,10 @@ static void backup_file(const std::string &from, const std::string &to) {
* have gone wrong.
*/
boost::filesystem::path pfrom(from), pto(to);
auto constexpr option_fail_if_exists = boost::filesystem::copy_options::none;
try {
boost::filesystem::copy_file(
pfrom, pto, boost::filesystem::copy_option::fail_if_exists);
} catch (const boost::filesystem::filesystem_error &e) {
boost::filesystem::copy_file(pfrom, pto, option_fail_if_exists);
} catch (const boost::filesystem::filesystem_error &) {
throw left_backupfile();
}
}
Expand Down

0 comments on commit fac515d

Please sign in to comment.