Skip to content

Commit

Permalink
Update broken_library_info_test.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
apolukhin authored Jan 4, 2025
1 parent b2104e9 commit b177e13
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions test/broken_library_info_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ int main(int argc, char* argv[]) {
const auto self_binary = boost::dll::fs::path(argv[0]);
const auto corrupted_binary = self_binary.parent_path() / "corrupted";

boost::filesystem::copy_file(self_binary, corrupted_binary, boost::filesystem::copy_option::overwrite_if_exists);
boost::filesystem::copy_file(self_binary, corrupted_binary, boost::filesystem::copy_options::overwrite_existing);
{
std::ofstream ofs{corrupted_binary.string(), std::ios::binary};
ofs.seekp(0);
Expand All @@ -30,7 +30,7 @@ int main(int argc, char* argv[]) {
} catch (const std::exception& ) {}

#if BOOST_OS_WINDOWS
boost::filesystem::copy_file(self_binary, corrupted_binary, boost::filesystem::copy_option::overwrite_if_exists);
boost::filesystem::copy_file(self_binary, corrupted_binary, boost::filesystem::copy_options::overwrite_existing);
{
std::ofstream ofs{corrupted_binary.string(), std::ios::binary};
ofs.seekp(
Expand All @@ -51,7 +51,7 @@ int main(int argc, char* argv[]) {

#if !BOOST_OS_WINDOWS && !BOOST_OS_MACOS && !BOOST_OS_IOS
// Elf
boost::filesystem::copy_file(self_binary, corrupted_binary, boost::filesystem::copy_option::overwrite_if_exists);
boost::filesystem::copy_file(self_binary, corrupted_binary, boost::filesystem::copy_options::overwrite_existing);
{
std::ofstream ofs{corrupted_binary.string(), std::ios::binary};
ofs.seekp(40); // header->e_shoff
Expand Down

0 comments on commit b177e13

Please sign in to comment.