导入录像时会先检测重复文件名
This commit is contained in:
@@ -100,9 +100,10 @@ function scene.keyDown(key)
|
|||||||
local fileName=os.date("replay/%Y_%m_%d_%H%M%S_import.rep")
|
local fileName=os.date("replay/%Y_%m_%d_%H%M%S_import.rep")
|
||||||
local rep=DATA.parseReplayData(fileName,fileData,false)
|
local rep=DATA.parseReplayData(fileName,fileData,false)
|
||||||
if rep.available then
|
if rep.available then
|
||||||
love.filesystem.write(fileName,fileData)
|
if FILE.save(fileData,fileName,'d')then
|
||||||
table.insert(REPLAY,1,rep)
|
table.insert(REPLAY,1,rep)
|
||||||
MES.new('info',text.importSuccess)
|
MES.new('info',text.importSuccess)
|
||||||
|
end
|
||||||
else
|
else
|
||||||
MES.new('error',text.dataCorrupted)
|
MES.new('error',text.dataCorrupted)
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user