1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-07 21:21:31 +00:00

Change module separator to directory separator as is done in

Lua's ?.lua loader. This is necessary when requiring submodules
e.g. require "foo.bar"
This commit is contained in:
batrick
2011-09-20 18:24:09 +00:00
parent 6069b50ce3
commit 8628520123

View File

@@ -119,6 +119,7 @@ local cnse, rules = ...; -- The NSE C library and Script Rules
do -- Add loader to look in nselib/?.lua (nselib/ can be in multiple places)
local function loader (lib)
lib = lib:gsub("%.", "/"); -- change Lua "module seperator" to directory separator
local name = "nselib/"..lib..".lua";
local type, path = cnse.fetchfile_absolute(name);
if type == "file" then