mirror of
https://github.com/wiremod/advdupe2.git
synced 2025-03-04 03:03:05 -05:00
Close temp file when there's an error (#103)
* Close temp file when there's an error so you don't have to wait for garbage collection of the file in order to load another dupe.
This commit is contained in:
parent
b79287b7f8
commit
1c39b8ed0e
@ -375,10 +375,14 @@ local function deserialize(str)
|
||||
buff:Close()
|
||||
|
||||
buff = file.Open("ad2temp.txt","rb", "DATA")
|
||||
local tbl = read()
|
||||
local success, tbl = pcall(read)
|
||||
buff:Close()
|
||||
|
||||
return tbl
|
||||
if success then
|
||||
return tbl
|
||||
else
|
||||
error(tbl)
|
||||
end
|
||||
end
|
||||
|
||||
--[[
|
||||
|
Loading…
Reference in New Issue
Block a user