Use system instead of io.open
This commit is contained in:
parent
46447d83c3
commit
d5775257b4
|
|
@ -74,7 +74,7 @@
|
||||||
end
|
end
|
||||||
|
|
||||||
--include before
|
--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
|
for file in result:lines() do
|
||||||
if (string.sub(file, -4) == ".lua") then
|
if (string.sub(file, -4) == ".lua") then
|
||||||
if file_exists(scripts_dir.."/app/dialplan/resources/before/"..file) then
|
if file_exists(scripts_dir.."/app/dialplan/resources/before/"..file) then
|
||||||
|
|
@ -85,7 +85,7 @@
|
||||||
end
|
end
|
||||||
|
|
||||||
--include the dialplans
|
--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
|
for file in result:lines() do
|
||||||
if (string.sub(file, -4) == ".lua") then
|
if (string.sub(file, -4) == ".lua") then
|
||||||
if file_exists(scripts_dir.."/app/dialplan/resources/"..dialplan_dir.."/"..file) then
|
if file_exists(scripts_dir.."/app/dialplan/resources/"..dialplan_dir.."/"..file) then
|
||||||
|
|
@ -96,7 +96,7 @@
|
||||||
end
|
end
|
||||||
|
|
||||||
--include after
|
--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
|
for file in result:lines() do
|
||||||
if (string.sub(file, -4) == ".lua") then
|
if (string.sub(file, -4) == ".lua") then
|
||||||
if file_exists(scripts_dir.."/app/dialplan/resources/after/"..file) then
|
if file_exists(scripts_dir.."/app/dialplan/resources/after/"..file) then
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue