diff options
| author | Carl Hetherington <cth@carlh.net> | 2023-11-11 01:31:58 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2023-11-12 22:11:27 +0100 |
| commit | dfa7b94e802b05bba4243381460eef96626102a0 (patch) | |
| tree | 348ab6b50c7b074e351f2577101ae583a1597c58 /src/lib | |
| parent | 0f225b6df7a9603678a5bd84f9428ff6fb56aea2 (diff) | |
Replace deprecated leaf() with filename().
Diffstat (limited to 'src/lib')
| -rw-r--r-- | src/lib/content_factory.cc | 2 | ||||
| -rw-r--r-- | src/lib/create_cli.cc | 2 | ||||
| -rw-r--r-- | src/lib/film.cc | 2 | ||||
| -rw-r--r-- | src/lib/image_filename_sorter.cc | 2 | ||||
| -rw-r--r-- | src/lib/job.cc | 2 | ||||
| -rw-r--r-- | src/lib/playlist.cc | 2 | ||||
| -rw-r--r-- | src/lib/types.cc | 2 | ||||
| -rw-r--r-- | src/lib/uploader.cc | 2 | ||||
| -rw-r--r-- | src/lib/util.cc | 4 |
9 files changed, 10 insertions, 10 deletions
diff --git a/src/lib/content_factory.cc b/src/lib/content_factory.cc index e1278c3b4..dfa1ba55e 100644 --- a/src/lib/content_factory.cc +++ b/src/lib/content_factory.cc @@ -129,7 +129,7 @@ content_factory (boost::filesystem::path path) LOG_GENERAL ("Checking file %1", i->path()); - if (boost::starts_with (i->path().leaf().string(), ".")) { + if (boost::starts_with(i->path().filename().string(), ".")) { /* We ignore hidden files */ LOG_GENERAL ("Ignored %1 (starts with .)", i->path()); continue; diff --git a/src/lib/create_cli.cc b/src/lib/create_cli.cc index 6752be409..1c2f2c635 100644 --- a/src/lib/create_cli.cc +++ b/src/lib/create_cli.cc @@ -316,7 +316,7 @@ CreateCLI::CreateCLI (int argc, char* argv[]) } if (_name.empty()) { - _name = content[0].path.leaf().string(); + _name = content[0].path.filename().string(); } if (_j2k_bandwidth && (*_j2k_bandwidth < 10000000 || *_j2k_bandwidth > Config::instance()->maximum_j2k_bandwidth())) { diff --git a/src/lib/film.cc b/src/lib/film.cc index b4ad0d0f4..7ba245422 100644 --- a/src/lib/film.cc +++ b/src/lib/film.cc @@ -1303,7 +1303,7 @@ Film::cpls () const for (auto const& item: dcp::filesystem::directory_iterator(dir)) { if ( dcp::filesystem::is_directory(item) && - item.path().leaf() != "j2c" && item.path().leaf() != "video" && item.path().leaf() != "info" && item.path().leaf() != "analysis" + item.path().filename() != "j2c" && item.path().filename() != "video" && item.path().filename() != "info" && item.path().filename() != "analysis" ) { try { diff --git a/src/lib/image_filename_sorter.cc b/src/lib/image_filename_sorter.cc index ab0d298fc..f0370bdcb 100644 --- a/src/lib/image_filename_sorter.cc +++ b/src/lib/image_filename_sorter.cc @@ -54,7 +54,7 @@ string ImageFilenameSorter::extract_numbers (boost::filesystem::path p) { string numbers; - auto const ps = p.leaf().string(); + auto const ps = p.filename().string(); for (size_t i = 0; i < ps.size(); ++i) { if (isdigit (ps[i])) { numbers += ps[i]; diff --git a/src/lib/job.cc b/src/lib/job.cc index 727456523..28bdde7fc 100644 --- a/src/lib/job.cc +++ b/src/lib/job.cc @@ -111,7 +111,7 @@ Job::run_wrapper () } catch (dcp::FileError& e) { - string m = String::compose (_("An error occurred whilst handling the file %1."), boost::filesystem::path (e.filename()).leaf()); + string m = String::compose(_("An error occurred whilst handling the file %1."), e.filename().filename()); try { auto const s = dcp::filesystem::space(e.filename()); diff --git a/src/lib/playlist.cc b/src/lib/playlist.cc index 7f8292c7f..85957e106 100644 --- a/src/lib/playlist.cc +++ b/src/lib/playlist.cc @@ -684,7 +684,7 @@ Playlist::content_summary (shared_ptr<const Film> film, DCPTimePeriod period) co } if (score > best_score) { - best_summary = i->path(0).leaf().string(); + best_summary = i->path(0).filename().string(); best_score = score; } } diff --git a/src/lib/types.cc b/src/lib/types.cc index a87c354f3..58382fdc7 100644 --- a/src/lib/types.cc +++ b/src/lib/types.cc @@ -45,7 +45,7 @@ using dcp::raw_convert; CPLSummary::CPLSummary (boost::filesystem::path p) - : dcp_directory (p.leaf().string()) + : dcp_directory(p.filename().string()) { dcp::DCP dcp (p); diff --git a/src/lib/uploader.cc b/src/lib/uploader.cc index c5448e469..f2a47f50e 100644 --- a/src/lib/uploader.cc +++ b/src/lib/uploader.cc @@ -76,7 +76,7 @@ Uploader::upload_directory (boost::filesystem::path base, boost::filesystem::pat if (is_directory(i.path())) { upload_directory (base, i.path(), transferred, total_size); } else { - _set_status (String::compose(_("copying %1"), i.path().leaf())); + _set_status(String::compose(_("copying %1"), i.path().filename())); upload_file (i.path(), remove_prefix (base, i.path()), transferred, total_size); } } diff --git a/src/lib/util.cc b/src/lib/util.cc index e0b5a294f..71aee88fe 100644 --- a/src/lib/util.cc +++ b/src/lib/util.cc @@ -673,7 +673,7 @@ short_audio_channel_name (int c) bool valid_image_file (boost::filesystem::path f) { - if (boost::starts_with (f.leaf().string(), "._")) { + if (boost::starts_with(f.filename().string(), "._")) { return false; } @@ -690,7 +690,7 @@ valid_image_file (boost::filesystem::path f) bool valid_sound_file (boost::filesystem::path f) { - if (boost::starts_with (f.leaf().string(), "._")) { + if (boost::starts_with(f.filename().string(), "._")) { return false; } |
