[mod_magnet] fix regression in lighty.stat (fixes #2877)
fix regression in mod_magnet lighty.stat introduced in lighttpd 1.4.49 in commit commit:b1df38ab x-ref: "lighty.stat failure" https://redmine.lighttpd.net/issues/2877personal/stbuehler/fix-fdevent
parent
e21906b3b4
commit
86f64a0288
|
@ -334,14 +334,16 @@ static int magnet_stat(lua_State *L) {
|
|||
handler_t res;
|
||||
|
||||
res = stat_cache_get_entry(srv, con, sb, &sce);
|
||||
stat_cache_content_type_get(srv, con, sb, sce);
|
||||
buffer_free(sb);
|
||||
|
||||
if (HANDLER_GO_ON != res) {
|
||||
buffer_free(sb);
|
||||
lua_pushnil(L);
|
||||
return 1;
|
||||
}
|
||||
|
||||
stat_cache_content_type_get(srv, con, sb, sce);
|
||||
buffer_free(sb);
|
||||
|
||||
lua_newtable(L); // return value
|
||||
|
||||
lua_pushboolean(L, S_ISREG(sce->st.st_mode));
|
||||
|
|
Loading…
Reference in New Issue