Make find_file() recursive.
authorCarl Hetherington <cth@carlh.net>
Tue, 16 May 2023 21:13:53 +0000 (23:13 +0200)
committerCarl Hetherington <cth@carlh.net>
Tue, 16 May 2023 21:13:53 +0000 (23:13 +0200)
test/test.cc

index 06ec23dbcb6c4daadd5399cba6058fcb87197ed4..1200e13b7c93fc25fa5c6f1b029f50b440401656 100644 (file)
@@ -987,7 +987,7 @@ boost::filesystem::path
 find_file (boost::filesystem::path dir, string filename_part)
 {
        boost::optional<boost::filesystem::path> found;
-       for (auto i: boost::filesystem::directory_iterator(dir)) {
+       for (auto i: boost::filesystem::recursive_directory_iterator(dir)) {
                if (i.path().filename().string().find(filename_part) != string::npos) {
                        BOOST_REQUIRE (!found);
                        found = i;