From 7d8e46ea1f5ad5b80197242d2453b98844f37b24 Mon Sep 17 00:00:00 2001 From: Pablo Mayobre Date: Tue, 14 Feb 2023 22:18:59 -0300 Subject: [PATCH] Normalize slashes to dots when requiring in Utils.loadNamespace --- concord/utils.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/concord/utils.lua b/concord/utils.lua index b33b719..0802586 100644 --- a/concord/utils.lua +++ b/concord/utils.lua @@ -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