文件保存时一般不再弹出保存成功的消息

This commit is contained in:
MrZ626
2021-06-19 14:05:59 +08:00
parent 98715e4579
commit 4c95f6bfbc
10 changed files with 51 additions and 34 deletions

View File

@@ -48,14 +48,11 @@ function FILE.save(data,name,mode)
F:open'w'
local success,mes=F:write(data)
F:flush()F:close()
if success then
if not mode:find'q'then
MES.new('check',text.saveDone)
end
else
if not success then
MES.new('error',text.saveError..(mes or"unknown error"))
MES.new(false,debug.traceback())
end
return success
end
function FILE.clear(path)
if fs.getRealDirectory(path)~=SAVEDIR or fs.getInfo(path).type~='directory'then return end