fs: use lstat over stat
This commit is contained in:
parent
a27ebcd8c3
commit
c620c39f0a
1 changed files with 1 additions and 1 deletions
2
lfs.c
2
lfs.c
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue