mirror of
https://github.com/SquidDev-CC/CC-Tweaked
synced 2025-04-27 21:23:20 +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 )
|
function open( _sPath, _sMode )
|
||||||
local sMode = _sMode or "r"
|
local sMode = _sMode or "r"
|
||||||
local file = fs.open( _sPath, sMode )
|
local file, err = fs.open( _sPath, sMode )
|
||||||
if not file then
|
if not file then
|
||||||
return nil
|
return nil, err
|
||||||
end
|
end
|
||||||
|
|
||||||
if sMode == "r"then
|
if sMode == "r"then
|
||||||
|
Loading…
x
Reference in New Issue
Block a user