From dfa7b94e802b05bba4243381460eef96626102a0 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Sat, 11 Nov 2023 01:31:58 +0100 Subject: Replace deprecated leaf() with filename(). --- test/test.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'test/test.cc') diff --git a/test/test.cc b/test/test.cc index 9b08dfb4e..2bd31292a 100644 --- a/test/test.cc +++ b/test/test.cc @@ -843,7 +843,7 @@ dcp_file (shared_ptr film, string prefix) vector matches; std::copy_if(recursive_directory_iterator(film->dir(film->dcp_name())), recursive_directory_iterator(), std::back_inserter(matches), [&prefix](directory_entry const& entry) { - return boost::algorithm::starts_with(entry.path().leaf().string(), prefix); + return boost::algorithm::starts_with(entry.path().filename().string(), prefix); }); BOOST_REQUIRE_MESSAGE(matches.size() == 1, "Found " << matches.size() << " files with prefix " << prefix); @@ -854,7 +854,7 @@ boost::filesystem::path subtitle_file (shared_ptr film) { for (auto i: boost::filesystem::recursive_directory_iterator(film->directory().get() / film->dcp_name(false))) { - if (boost::algorithm::starts_with(i.path().leaf().string(), "sub_")) { + if (boost::algorithm::starts_with(i.path().filename().string(), "sub_")) { return i.path(); } } -- cgit v1.2.3