- const BuildInfo::PathList &incpath = component->get_build_info().incpath;
- BuildInfo::PathList local_incpath = incpath;
- local_incpath.push_front(FS::dirname(path).str());
+ const BuildInfo &build_info = component->get_build_info_for_path(path);
+ const auto &incpath = build_info.incpath;
+ VirtualFileSystem::SearchPath local_incpath;
+ local_incpath.reserve(1+build_info.local_incpath.size()+incpath.size());
+ local_incpath.push_back(FS::dirname(path).str());
+ local_incpath.insert(local_incpath.end(), build_info.local_incpath.begin(), build_info.local_incpath.end());
+ local_incpath.insert(local_incpath.end(), incpath.begin(), incpath.end());