mirror of
https://github.com/Keyslam-Group/Concord.git
synced 2025-09-01 11:53:57 -04:00
Normalize slashes to dots when calling require in Utils.loadNamespace
Co-authored-by: Ulhar <ulhar@protonmail.ch>
This commit is contained in:
parent
1e4132be21
commit
2386547caa
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 path = pathOrFiles.."."..name
|
||||
|
||||
local value = require(path)
|
||||
local value = require(path:gsub("%/", "."))
|
||||
if namespace then namespace[name] = value end
|
||||
end
|
||||
end
|
||||
|
@ -61,7 +61,7 @@ function Utils.loadNamespace(pathOrFiles, namespace)
|
|||
name = path:sub((dotIndex or slashIndex) + 1)
|
||||
end
|
||||
|
||||
local value = require(path)
|
||||
local value = require(path:gsub("%/", "."))
|
||||
if namespace then namespace[name] = value end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue