opti use path_create

This commit is contained in:
camille lechauve 2023-09-03 21:40:37 +02:00
parent a45536aeab
commit 79b0f2d2ac

View File

@ -1,17 +1,7 @@
utils = include("sv_utils.lua") utils = include("sv_utils.lua")
config = include("../sh_config.lua") config = include("../sh_config.lua")
local dirs = utils.split(config.config_path, "/") utils.path_create(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
if not file.Exists(config.config_path, "DATA") if not file.Exists(config.config_path, "DATA")
then then