From b4e9a77e7450731be6cd41a1a66f7ec24e2e685d Mon Sep 17 00:00:00 2001 From: Paul Kulchenko Date: Sun, 26 Jun 2022 21:13:53 -0700 Subject: [PATCH] Improve redbean ZeroBrane integration (#451) --- tool/net/redbean.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tool/net/redbean.c b/tool/net/redbean.c index ad4219530..e863e957b 100644 --- a/tool/net/redbean.c +++ b/tool/net/redbean.c @@ -4946,8 +4946,8 @@ static bool LuaRunAsset(const char *path, bool mandatory) { effectivepath.p = path; effectivepath.n = pathlen; DEBUGF("(lua) LuaRunAsset(%`'s)", path); - status = - luaL_loadbuffer(L, code, codelen, FreeLater(xasprintf("@%s", path))); + status = luaL_loadbuffer(L, code, codelen, + FreeLater(xasprintf("@%s%s", a->file ? "" : "/zip", path))); if (status != LUA_OK || LuaCallWithTrace(L, 0, 0, NULL) != LUA_OK) { LogLuaError("lua code", lua_tostring(L, -1)); lua_pop(L, 1); // pop error