path.push_back("/");
else
{
- string env_path = Msp::getenv("PATH");
- if(!env_path.empty())
+ if(sys_bin_path.empty())
{
- for(const string &p: split(env_path, ':'))
- path.push_back(p);
- }
- else
- {
- path.push_back("/bin");
- path.push_back("/usr/bin");
+ string env_path = Msp::getenv("PATH");
+ if(!env_path.empty())
+ {
+ for(const string &p: split(env_path, ':'))
+ sys_bin_path.push_back(p);
+ }
+ else
+ {
+ sys_bin_path.push_back("/bin");
+ sys_bin_path.push_back("/usr/bin");
+ }
}
+ path = sys_bin_path;
}
for(const FS::Path &p: path)
Builder &builder;
std::map<Msp::FS::Path, FileTarget *> targets;
std::set<Msp::FS::Path> nonexistent;
+ SearchPath sys_bin_path;
public:
VirtualFileSystem(Builder &);