mirror of
https://github.com/Keyslam-Group/Concord.git
synced 2025-09-04 05:13:55 -04:00
Normalize slashes to dots when requiring in Utils.loadNamespace
This commit is contained in:
parent
75c35d986a
commit
7d8e46ea1f
1 changed files with 2 additions and 2 deletions
|
@ -44,7 +44,7 @@ function Utils.loadNamespace(pathOrFiles, namespace)
|
||||||
local name = file:sub(1, #file - 4)
|
local name = file:sub(1, #file - 4)
|
||||||
local path = pathOrFiles.."."..name
|
local path = pathOrFiles.."."..name
|
||||||
|
|
||||||
local value = require(path)
|
local value = require(path:gsub("%/", "."))
|
||||||
if namespace then namespace[name] = value end
|
if namespace then namespace[name] = value end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -61,7 +61,7 @@ function Utils.loadNamespace(pathOrFiles, namespace)
|
||||||
name = path:sub((dotIndex or slashIndex) + 1)
|
name = path:sub((dotIndex or slashIndex) + 1)
|
||||||
end
|
end
|
||||||
|
|
||||||
local value = require(path)
|
local value = require(path:gsub("%/", "."))
|
||||||
if namespace then namespace[name] = value end
|
if namespace then namespace[name] = value end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue