| 111 | } |
| 112 | |
| 113 | bool ModuleFileAccess::isModuleAllowed ( const string & mod, const string & fileName ) const { |
| 114 | if(failed() || !moduleAllowed) return FileAccess::isModuleAllowed(mod,fileName); |
| 115 | vec4f args[2]; |
| 116 | args[0] = cast<const char *>::from(mod.c_str()); |
| 117 | args[1] = cast<const char *>::from(fileName.c_str()); |
| 118 | auto res = context->evalWithCatch(moduleAllowed, args, nullptr); |
| 119 | auto exc = context->getException(); exc; |
| 120 | DAS_ASSERTF(!exc, "exception failed in `module_allowed`: %s", exc); |
| 121 | return cast<bool>::to(res); |
| 122 | } |
| 123 | |
| 124 | ModuleInfo ModuleFileAccess::getModuleInfo ( const string & req, const string & from ) const { |
| 125 | if (failed()) return FileAccess::getModuleInfo(req, from); |
no test coverage detected