deduplicate redownloads
This commit is contained in:
parent
7c34250e35
commit
0de38f49a8
1 changed files with 7 additions and 5 deletions
|
@ -89,6 +89,7 @@ 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, " ")
|
||||||
|
if filename == valueTable[1] then
|
||||||
local filePath = path .. program .. "/" .. valueTable[1]
|
local filePath = path .. program .. "/" .. valueTable[1]
|
||||||
if valueTable[2] == "delete" and fs.exists(filePath) then
|
if valueTable[2] == "delete" and fs.exists(filePath) then
|
||||||
fs.delete(filePath)
|
fs.delete(filePath)
|
||||||
|
@ -97,6 +98,7 @@ local function getAllFiles(program)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
||||||
return finalResult
|
return finalResult
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue