Use system instead of io.open

This commit is contained in:
FusionPBX 2022-05-24 16:38:04 -06:00 committed by GitHub
parent 46447d83c3
commit d5775257b4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -74,7 +74,7 @@
end
--include before
result = assert (io.popen ("dir " ..scripts_dir.."/app/dialplan/resources/before /b -1"));
result = assert (system("dir " ..scripts_dir.."/app/dialplan/resources/before /b -1"));
for file in result:lines() do
if (string.sub(file, -4) == ".lua") then
if file_exists(scripts_dir.."/app/dialplan/resources/before/"..file) then
@ -85,7 +85,7 @@
end
--include the dialplans
result = assert (io.popen ("dir " ..scripts_dir.."/app/dialplan/resources/"..dialplan_dir.." /b -1"));
result = assert (system("dir " ..scripts_dir.."/app/dialplan/resources/"..dialplan_dir.." /b -1"));
for file in result:lines() do
if (string.sub(file, -4) == ".lua") then
if file_exists(scripts_dir.."/app/dialplan/resources/"..dialplan_dir.."/"..file) then
@ -96,7 +96,7 @@
end
--include after
result = assert (io.popen ("dir " ..scripts_dir.."/app/dialplan/resources/after /b -1"));
result = assert (system("dir " ..scripts_dir.."/app/dialplan/resources/after /b -1"));
for file in result:lines() do
if (string.sub(file, -4) == ".lua") then
if file_exists(scripts_dir.."/app/dialplan/resources/after/"..file) then