projects
/
dcpomatic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
49fbf8b
)
Fix subtitle_file() to find both Interop and SMPTE subtitles.
author
Carl Hetherington
<cth@carlh.net>
Tue, 20 Sep 2022 19:23:40 +0000
(21:23 +0200)
committer
Carl Hetherington
<cth@carlh.net>
Tue, 20 Sep 2022 19:24:16 +0000
(21:24 +0200)
test/test.cc
patch
|
blob
|
history
diff --git
a/test/test.cc
b/test/test.cc
index 9261ce43ba0e0515fa4e57dd3e29fc5ce28eb7f3..f1fd40fb791597c4bf5da7e960a05b523b5878cb 100644
(file)
--- a/
test/test.cc
+++ b/
test/test.cc
@@
-836,13
+836,9
@@
dcp_file (shared_ptr<const Film> film, string prefix)
boost::filesystem::path
subtitle_file (shared_ptr<Film> film)
{
boost::filesystem::path
subtitle_file (shared_ptr<Film> film)
{
- for (auto i: boost::filesystem::directory_iterator(film->directory().get() / film->dcp_name (false))) {
- if (boost::filesystem::is_directory(i.path())) {
- for (auto j: boost::filesystem::directory_iterator(i.path())) {
- if (boost::algorithm::starts_with(j.path().leaf().string(), "sub_")) {
- return j.path();
- }
- }
+ 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_")) {
+ return i.path();
}
}
}
}