forked from github/server
use the reportpath from the config file, do not build your own
This commit is contained in:
parent
fc259d232b
commit
071f67ea7c
|
@ -814,7 +814,7 @@ end
|
||||||
|
|
||||||
local function find_in_report(f, pattern, extension)
|
local function find_in_report(f, pattern, extension)
|
||||||
extension = extension or "nr"
|
extension = extension or "nr"
|
||||||
local filename = config.basepath .. "/reports/" .. get_turn() .. "-" .. itoa36(f.id) .. "." .. extension
|
local filename = config.reportpath .. "/" .. get_turn() .. "-" .. itoa36(f.id) .. "." .. extension
|
||||||
local report = io.open(filename, 'rt');
|
local report = io.open(filename, 'rt');
|
||||||
assert_not_nil(report)
|
assert_not_nil(report)
|
||||||
t = report:read("*all")
|
t = report:read("*all")
|
||||||
|
|
|
@ -1142,6 +1142,9 @@ static void parse_inifile(lua_State * L, dictionary * d, const char *section)
|
||||||
lua_pushstring(L, "basepath");
|
lua_pushstring(L, "basepath");
|
||||||
lua_pushstring(L, basepath());
|
lua_pushstring(L, basepath());
|
||||||
lua_rawset(L, -3);
|
lua_rawset(L, -3);
|
||||||
|
lua_pushstring(L, "reportpath");
|
||||||
|
lua_pushstring(L, reportpath());
|
||||||
|
lua_rawset(L, -3);
|
||||||
}
|
}
|
||||||
|
|
||||||
int tolua_eressea_open(lua_State * L)
|
int tolua_eressea_open(lua_State * L)
|
||||||
|
|
Loading…
Reference in New Issue