fs: use lstat over stat

This commit is contained in:
Jeremy Baxter 2024-03-24 14:21:49 +13:00
parent a27ebcd8c3
commit c620c39f0a

2
lfs.c
View file

@ -306,7 +306,7 @@ ismode(lua_State *L, mode_t mode)
path = luaL_checkstring(L, 1); path = luaL_checkstring(L, 1);
if (stat(path, &sb) != -1) { if (lstat(path, &sb) != -1) {
lua_pushboolean(L, sb.st_mode & mode); lua_pushboolean(L, sb.st_mode & mode);
return 1; return 1;
} }