use the reportpath from the config file, do not build your own

This commit is contained in:
Enno Rehling 2012-05-25 18:50:14 -07:00
parent fc259d232b
commit 071f67ea7c
2 changed files with 4 additions and 1 deletions

View File

@ -814,7 +814,7 @@ end
local function find_in_report(f, pattern, extension)
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');
assert_not_nil(report)
t = report:read("*all")

View File

@ -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_rawset(L, -3);
lua_pushstring(L, "reportpath");
lua_pushstring(L, reportpath());
lua_rawset(L, -3);
}
int tolua_eressea_open(lua_State * L)