Reinstating fix for Garry's broken API…

So sad.
This commit is contained in:
Nayruden 2012-11-05 19:20:19 -05:00
parent 8724b86df1
commit 464d7ff05e

View File

@ -335,3 +335,23 @@ function ULib.pcallError( ... )
return unpack( returns )
end
--- TEMP fix for garry's broken API (Hopefully he fixes this soon, still broken as of official GM13 release)
local oldExists = file.Exists
function file.Exists( path, option )
if option == "DATA" then
option = "GAME"
path = "data/" .. path
end
return oldExists( path, option )
end
local oldRead = file.Read
function file.Read( path, option )
if option == "DATA" then
option = "GAME"
path = "data/" .. path
end
return oldRead( path, option )
end