forked from izaya/OC-PsychOS2
detect absolute/relative paths in pkgfs
This commit is contained in:
parent
ffc6c8915a
commit
21d71b29ba
@ -99,7 +99,9 @@ function pkgfs.component.close(handle)
|
||||
end
|
||||
|
||||
function pkgfs.add(fname,comp)
|
||||
local fname = "/"..fnormalize(os.getenv("PWD").."/"..fname)
|
||||
if fname:sub(1,1) ~= "/" then
|
||||
fname = "/"..fnormalize(os.getenv("PWD").."/"..fname)
|
||||
end
|
||||
local f = fopen(fname,comp)
|
||||
if not fname then error("unable to open file") end
|
||||
print(fname)
|
||||
|
Loading…
Reference in New Issue
Block a user