完善FILE.load的使用

重点修正几个string模式保存的文件的读取,以防刚好符合其他格式自动判断的条件
This commit is contained in:
MrZ626
2021-10-15 01:04:00 +08:00
parent 964537219a
commit dfa356e9d9
3 changed files with 5 additions and 5 deletions

View File

@@ -85,7 +85,7 @@ local loadingThread=coroutine.wrap(function()
YIELD('loadMode')
for _,M in next,MODES do
M.records=FILE.load("record/"..M.name..".rec")or M.score and{}
M.records=FILE.load("record/"..M.name..".rec",'luaon')or M.score and{}
M.icon=M.icon and(modeIcons[M.icon]or gc.newImage("media/image/modeicon/"..M.icon..".png"))
end

View File

@@ -90,7 +90,7 @@ function scene.keyDown(key)
local rep=listBox:getSel()
if rep then
if rep.available and rep.fileName then
local repStr=FILE.load(rep.fileName)
local repStr=FILE.load(rep.fileName,'string')
if repStr then
love.system.setClipboardText(love.data.encode('string','base64',repStr))
MES.new('info',text.exportSuccess)