make :members() not return index, add -DBLLUA_ALLOWFFI, allow reading modules/lualib/, bug fixes
This commit is contained in:
		| @@ -89,11 +89,12 @@ local allowed_zip_dirs = tflip{ | ||||
| local function io_open_absolute(fn, mode) | ||||
| 	-- if file exists, use original mode | ||||
| 	local res, err = _bllua_io_open(fn, mode) | ||||
| 	if res then return res end | ||||
| 	if res then return res | ||||
| 	elseif err and not err:find('No such file or directory$') then return nil, err end | ||||
| 	 | ||||
| 	-- otherwise, if TS sees file but Lua doesn't, it must be in a zip, so use TS reader | ||||
| 	local dir = fn:match('^[^/]+') | ||||
| 	if not allowed_zip_dirs[dir:lower()] then return nil, 'File is not in one of the allowed directories' end | ||||
| 	if not allowed_zip_dirs[dir:lower()] then return nil, 'Zip is not in one of the allowed directories' end | ||||
| 	local exist = _bllua_ts.call('isFile', fn) == '1' | ||||
| 	if not exist then return nil, err end | ||||
| 	 | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Redo
					Redo