mirror of
https://github.com/SquidDev-CC/CC-Tweaked
synced 2025-01-12 02:10:30 +00:00
Merge pull request #389 from Wilma456/ioerr
Make io.open() return Error
This commit is contained in:
commit
2fb6a9dc62
@ -63,9 +63,9 @@ end
|
||||
|
||||
function open( _sPath, _sMode )
|
||||
local sMode = _sMode or "r"
|
||||
local file = fs.open( _sPath, sMode )
|
||||
local file, err = fs.open( _sPath, sMode )
|
||||
if not file then
|
||||
return nil
|
||||
return nil, err
|
||||
end
|
||||
|
||||
if sMode == "r"then
|
||||
|
Loading…
Reference in New Issue
Block a user