fix path issue, remove debugs

This commit is contained in:
jane 2021-06-06 01:08:13 -04:00
parent 803a5ba06f
commit 53a3145ce0

View file

@ -58,16 +58,16 @@ local function getAllFiles(program)
local updateUrl = url .. "/updates/" .. program
local currentFiles = ""
if fs.exists(path .. "indexes.dat") then
print("#DEBUG path " .. path .. program .. "/indexes.dat")
if fs.exists(path .. program .. "indexes.dat") then
--print("#DEBUG path " .. path .. program .. "/indexes.dat")
local indexesFile = fs.open(path .. program .. "/indexes.dat", "r")
local indexesFileText = indexesFile.readAll()
print("#DEBUG indexesFileText " .. indexesFileText)
--print("#DEBUG indexesFileText " .. indexesFileText)
currentFiles = indexesFileText
indexesFile.close()
end
print("#DEBUG currentFiles " .. currentFiles)
--print("#DEBUG currentFiles " .. currentFiles)
local updateResult = http.post(updateUrl, currentFiles)
if updateResult == nil then
@ -75,7 +75,7 @@ local function getAllFiles(program)
error()
end
local updateText = updateResult.readAll()
print("#DEBUG updateText" .. updateText)
--print("#DEBUG updateText" .. updateText)
local updateTable = split(updateText, "\n")
local indexesResult = http.get(indexesUrl)
@ -84,7 +84,7 @@ local function getAllFiles(program)
error()
end
local indexesText = indexesResult.readAll()
print("#DEBUG indexesText" .. indexesText)
--print("#DEBUG indexesText" .. indexesText)
local indexesTable = split(indexesText, "\n")
local newIndexesFile = fs.open(path .. program .. "/indexes.dat", "w")