builtin/loader: Don't try to load files in main module path as modules

This commit is contained in:
Perttu Ahola 2014-10-15 12:05:27 +03:00
parent be1bd720be
commit dbd7e793f7

View File

@ -359,8 +359,9 @@ struct Module: public interface::Module, public loader::Interface
set_<ss_> required_modules; set_<ss_> required_modules;
auto list = fs->list_directory(current); auto list = fs->list_directory(current);
for(const interface::Filesystem::Node &n : list){ for(const interface::Filesystem::Node &n : list){
if(n.name == "__loader") if(n.name == "__loader" || !n.is_directory)
continue; continue;
log_t(MODULE, "Requirement from main module path: \"%s\"", cs(n.name));
required_modules.insert(n.name); required_modules.insert(n.name);
} }