diff options
| author | amelia squires <[email protected]> | 2025-10-15 16:50:46 -0500 |
|---|---|---|
| committer | amelia squires <[email protected]> | 2025-10-15 16:50:46 -0500 |
| commit | b94f6d148193f91cab50d16e2873095827b89b1b (patch) | |
| tree | f550bd912cdd4c5469cec1ac320cb9c874df3476 /src/net | |
| parent | 8c2893be56c10af0a696282386b49fdb3c1e4a81 (diff) | |
better errors and docs
Diffstat (limited to 'src/net')
| -rw-r--r-- | src/net/lua.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/src/net/lua.c b/src/net/lua.c index ab112fe..829c2f7 100644 --- a/src/net/lua.c +++ b/src/net/lua.c @@ -221,12 +221,8 @@ int l_sendfile(lua_State* L){ lua_gettable(L, -2); int header = lua_gettop(L); - if(access(path, F_OK)) { - p_fatal("file not found"); //TODO: use diff errors here - } - if(access(path, R_OK)){ - p_fatal("missing permissions"); - } + luaI_assert(L, !access(path, F_OK) /*file not found*/); + luaI_assert(L, !access(path, R_OK) /*missing permissions*/); lua_pushstring(L, "Content-Type"); lua_gettable(L, header); |
