1
0
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:
Wilma456 (Jakob0815) 2017-07-28 15:18:14 +02:00 committed by GitHub
parent 579f7443a8
commit 83f34b430d

View File

@ -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