35 p = fs::path(prefix) / path;
43 vector<string> candidates = { p.string() };
44 if (!p.extension().empty())
46 candidates.push_back(p.stem().string());
51 for (
const string& fn : candidates)
58 fs::path full_path = fs::path(resources_path) / fn;
59 if (fs::is_regular_file(full_path) || fs::is_symlink(full_path))
61 return full_path.string();
64 for (
const string& ext : accepted_ext)
71 full_path = fs::path(resources_path) / fn;
72 if (ext.substr(0, 1) !=
".")
78 if (fs::is_regular_file(full_path) || fs::is_symlink(full_path))
80 return full_path.string();