Browse Source

Allow require paths without replacements

--HG--
branch : minor
Bart van Strien 10 years ago
parent
commit
ca343e063e
1 changed files with 2 additions and 3 deletions
  1. 2 3
      src/modules/filesystem/wrap_Filesystem.cpp

+ 2 - 3
src/modules/filesystem/wrap_Filesystem.cpp

@@ -558,10 +558,9 @@ int loader(lua_State *L)
 	for (std::string element : inst->getRequirePath())
 	{
 		size_t pos = element.find('?');
-		if (pos == std::string::npos)
-			continue;
+		if (pos != std::string::npos)
+			element.replace(pos, 1, modulename);
 
-		element.replace(pos, 1, modulename);
 		if (inst->isFile(element.c_str()))
 		{
 			lua_pop(L, 1);