mirror of
https://github.com/SquidDev-CC/CC-Tweaked
synced 2025-03-04 10:38:12 +00:00
Make io.open() return Error
If fs.open() failed, it will return nil and a a error message like "No such file" or "Out of space". This PR make, that io.open() returned this error too.
This commit is contained in:
parent
579f7443a8
commit
83f34b430d
@ -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…
x
Reference in New Issue
Block a user