mirror of
https://github.com/freebsd/freebsd-src.git
synced 2026-10-28 11:25:21 +01:00
stand: lua: break out a few more dirent types in lfs
These are non-standard and specific to the version used in loader. We have some desire to recognize symlinks to avoid filtering out kernel symlinks in the autodetection bits when they would be perfectly fine to `load`. This won't be usable right away, so any impending use will need to be careful to account for nil. Reported by: leres
This commit is contained in:
1 parent
863b5c137a
commit
bc531a96c9
1 file changed
+4
@@ -444,6 +444,10 @@ luaopen_lfs(lua_State *L)
|
||||
/* Non-standard extension for loader, used with lfs.dir(). */
|
||||
lua_pushinteger(L, DT_DIR);
|
||||
lua_setfield(L, -2, "DT_DIR");
|
||||
lua_pushinteger(L, DT_REG);
|
||||
lua_setfield(L, -2, "DT_REG");
|
||||
lua_pushinteger(L, DT_LNK);
|
||||
lua_setfield(L, -2, "DT_LNK");
|
||||
#endif
|
||||
return 1;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user