mirror of
https://github.com/etlegacy/wolfadmin.git
synced 2025-04-16 13:51:59 +00:00
Check whether sprees file exist (fixes #89)
This commit is contained in:
parent
2762ff7507
commit
415835c723
1 changed files with 5 additions and 0 deletions
|
@ -116,6 +116,11 @@ function sprees.load()
|
|||
|
||||
if string.find(fileName, ".toml") == string.len(fileName) - 4 then
|
||||
local fileDescriptor, fileLength = et.trap_FS_FOpenFile(fileName, et.FS_READ)
|
||||
|
||||
if fileLength == -1 then
|
||||
return 0
|
||||
end
|
||||
|
||||
local fileString = et.trap_FS_Read(fileDescriptor, fileLength)
|
||||
|
||||
et.trap_FS_FCloseFile(fileDescriptor)
|
||||
|
|
Loading…
Reference in a new issue