Explorar el Código

detect absolute/relative paths in pkgfs

master
XeonSquared hace 4 años
padre
commit
21d71b29ba
Se han modificado 1 ficheros con 3 adiciones y 1 borrados
  1. +3
    -1
      lib/pkgfs.lua

+ 3
- 1
lib/pkgfs.lua Ver fichero

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


Cargando…
Cancelar
Guardar