#include <algorithm>
#include <functional>
#include <iterator>
-
+#include <memory>
using namespace std;
using namespace lyx::support;
for (; it < end; ++it) {
if (prefixIs(s, (*it)->temppath())) {
// check whether the filename matches the master
- string const master_name = changeExtension(onlyFileName(
- (*it)->absFileName()), ".tex");
+ string const master_name = (*it)->latexName();
if (suffixIs(s, master_name))
return *it;
// if not, try with the children