X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fvirtualfilesystem.cpp;h=c9bfd23b0c564700ea7e1d13542c0c1118cbf6fc;hb=9f885c3eec8f065b7dc400acfb9dd67158284fcf;hp=783583f7798d2f9228b92a954bb93e387b7606cd;hpb=3938f8030b1f62802decce19777ce70fdafaff10;p=builder.git diff --git a/source/virtualfilesystem.cpp b/source/virtualfilesystem.cpp index 783583f..c9bfd23 100644 --- a/source/virtualfilesystem.cpp +++ b/source/virtualfilesystem.cpp @@ -146,17 +146,21 @@ FileTarget *VirtualFileSystem::find_binary(const string &name) 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)