Fix project files reading with symlink

This commit is contained in:
Francesco Abbate committed 2022-01-12 00:32:10 +01:00
1 parent 4cdd42de1a
commit ae1890d29a
2 files changed
+51 -21

No files matched your search

+8
View File
@@ -544,6 +544,14 @@ static int f_get_file_info(lua_State *L) {
}
lua_setfield(L, -2, "type");
#if __linux__
if (S_ISDIR(s.st_mode)) {
if (lstat(path, &s) == 0) {
lua_pushboolean(L, S_ISLNK(s.st_mode));
lua_setfield(L, -2, "symlink");
}
}
#endif
return 1;
}