summaryrefslogtreecommitdiff
path: root/test/test.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2023-11-11 01:31:58 +0100
committerCarl Hetherington <cth@carlh.net>2023-11-12 22:11:27 +0100
commitdfa7b94e802b05bba4243381460eef96626102a0 (patch)
tree348ab6b50c7b074e351f2577101ae583a1597c58 /test/test.cc
parent0f225b6df7a9603678a5bd84f9428ff6fb56aea2 (diff)
Replace deprecated leaf() with filename().
Diffstat (limited to 'test/test.cc')
-rw-r--r--test/test.cc4
1 files changed, 2 insertions, 2 deletions
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<const Film> film, string prefix)
vector<directory_entry> 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> 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();
}
}