From 79b0f2d2ac45f550c8394b197a5a3d75cdc9c295 Mon Sep 17 00:00:00 2001 From: camille lechauve Date: Sun, 3 Sep 2023 21:40:37 +0200 Subject: [PATCH] opti use path_create --- lua/autorun/server/sv_config.lua | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/lua/autorun/server/sv_config.lua b/lua/autorun/server/sv_config.lua index 5f46175..bf4bc91 100644 --- a/lua/autorun/server/sv_config.lua +++ b/lua/autorun/server/sv_config.lua @@ -1,17 +1,7 @@ utils = include("sv_utils.lua") config = include("../sh_config.lua") -local dirs = utils.split(config.config_path, "/") -table.remove(dirs) -local tmp = ""; -for i, dir in ipairs(dirs) do - tmp = tmp .. dir - if not file.Exists(tmp, "DATA") - then - file.CreateDir(tmp) - end - tmp = tmp .. "/" -end +utils.path_create(config.config_path) if not file.Exists(config.config_path, "DATA") then