one last round of nil checks

This commit is contained in:
jane 2021-06-06 00:53:11 -04:00
parent 0de38f49a8
commit a7f0295fed
2 changed files with 9 additions and 3 deletions

View File

@ -135,7 +135,9 @@ end
if shouldInstall then if shouldInstall then
local files = getAllFiles(programToInstall) local files = getAllFiles(programToInstall)
for _, value in ipairs(files) do for _, value in ipairs(files) do
downloadFile(programToInstall, value) if value ~= nil then
downloadFile(programToInstall, value)
end
end end
finishInstall(programToInstall, files) finishInstall(programToInstall, files)
elseif fs.exists(path .. "updater/update.lua") then elseif fs.exists(path .. "updater/update.lua") then

View File

@ -147,7 +147,9 @@ if programToInstall == nil then
local files = getAllFiles(value) local files = getAllFiles(value)
if files ~= nil then if files ~= nil then
for _, value2 in ipairs(files) do for _, value2 in ipairs(files) do
downloadFile(value, value2) if value2 ~= nil then
downloadFile(value, value2)
end
end end
finishInstall(files) finishInstall(files)
end end
@ -161,7 +163,9 @@ else
print("no updates found.") print("no updates found.")
else else
for _, value in ipairs(files) do for _, value in ipairs(files) do
downloadFile(programToInstall, value) if value ~= nil then
downloadFile(programToInstall, value)
end
end end
finishInstall(programToInstall, files) finishInstall(programToInstall, files)
end end