Okay so I compile fine, I run fine inside my source directory but as soon as I run the app in another working directory the output file refuses to be made, here's the snippet from my built-in lua script
Code:
function system(command,tmpenv)\n\
local name = os.tmpname() .. '_txt'\n\
local env,prv,pfx = setenvs(tmpenv)\n\
name = Lake.getcwd() .. '/' .. name:gsub('[/\\\\]','_')\n\
name = name:gsub('\\\\','/')\n\
command = pfx .. command .. ' >' .. name\n\
print( command )\n\
local r = Lake.system( command )\n\
if (Lake.access(name,0)~=0) then setenv(prv) return r end\n\
for line in io.lines(name) do\n\
print(line)\n\
end\n\
os.remove(name)\n\
setenv(prv)\n\
return (r or 1)\n\
end\n\
All those \n\ are just because this came from a string in my lake.c file,
the result of Lake.access(name,0) should always be 0 but as I said before whenever I try outside the source directory of my lake.c file the temporary file doesn't get created, any ideas as to what might be causing this?