opti use path_create
This commit is contained in:
parent
a45536aeab
commit
79b0f2d2ac
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user