deduplicate redownloads
This commit is contained in:
parent
7c34250e35
commit
0de38f49a8
1 changed files with 7 additions and 5 deletions
|
@ -89,11 +89,13 @@ local function getAllFiles(program)
|
||||||
local filename = split(value, " ")[1]
|
local filename = split(value, " ")[1]
|
||||||
for key2, value2 in ipairs(resultTable) do
|
for key2, value2 in ipairs(resultTable) do
|
||||||
local valueTable = split(value2, " ")
|
local valueTable = split(value2, " ")
|
||||||
local filePath = path .. program .. "/" .. valueTable[1]
|
if filename == valueTable[1] then
|
||||||
if valueTable[2] == "delete" and fs.exists(filePath) then
|
local filePath = path .. program .. "/" .. valueTable[1]
|
||||||
fs.delete(filePath)
|
if valueTable[2] == "delete" and fs.exists(filePath) then
|
||||||
elseif valueTable[2] == "download" then
|
fs.delete(filePath)
|
||||||
finalResult[#finalResult + 1] = valueTable[1]
|
elseif valueTable[2] == "download" then
|
||||||
|
finalResult[#finalResult + 1] = valueTable[1]
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue