Parcourir la source

detect absolute/relative paths in pkgfs

master
XeonSquared il y a 4 ans
Parent
révision
21d71b29ba
1 fichiers modifiés avec 3 ajouts et 1 suppressions
  1. +3
    -1
      lib/pkgfs.lua

+ 3
- 1
lib/pkgfs.lua Voir le fichier

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


Chargement…
Annuler
Enregistrer