bugfix: deleting definitions
scenario: delete a definition, restart Before this commit, the deleted definition would return.
This commit is contained in:
parent
ed2eddac57
commit
acc2fea361
14
live.lua
14
live.lua
|
@ -59,12 +59,14 @@ function live.load_files_so_far()
|
|||
end
|
||||
-- load files from save dir
|
||||
for _,filename in ipairs(love.filesystem.getDirectoryItems('')) do
|
||||
local numeric_prefix, root = filename:match('^(%d+)-(.+)')
|
||||
if numeric_prefix then
|
||||
if tonumber(numeric_prefix) > 0 then -- skip 0000
|
||||
Live.filename[root] = filename
|
||||
table.insert(Live.filenames_to_load, filename)
|
||||
Live.final_prefix = math.max(Live.final_prefix, tonumber(numeric_prefix))
|
||||
if io.open(love.filesystem.getSaveDirectory()..'/'..filename) then
|
||||
local numeric_prefix, root = filename:match('^(%d+)-(.+)')
|
||||
if numeric_prefix then
|
||||
if tonumber(numeric_prefix) > 0 then -- skip 0000
|
||||
Live.filename[root] = filename
|
||||
table.insert(Live.filenames_to_load, filename)
|
||||
Live.final_prefix = math.max(Live.final_prefix, tonumber(numeric_prefix))
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue