diff options
| author | Carl Hetherington <cth@carlh.net> | 2023-11-11 01:31:58 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2023-11-11 01:59:10 +0100 |
| commit | 7ad9dd774ec811707fa0edaa3867f5caa3c7c6ca (patch) | |
| tree | 2bd42c18b9b6c41db2c56c9dd81a3a16dd5fb805 /src/lib | |
| parent | d69a032b00b90d72ac9a7c0bd5f591c91aa40a20 (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/film.cc | 2 | ||||
| -rw-r--r-- | src/lib/image_filename_sorter.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 |
7 files changed, 8 insertions, 8 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/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/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; } |
