소스 검색

detect absolute/relative paths in pkgfs

master
XeonSquared 4 년 전
부모
커밋
21d71b29ba
1개의 변경된 파일3개의 추가작업 그리고 1개의 파일을 삭제
  1. +3
    -1
      lib/pkgfs.lua

+ 3
- 1
lib/pkgfs.lua 파일 보기

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


불러오는 중...
취소
저장