Fix project files reading with symlink

This commit is contained in:
Francesco Abbate
2022-01-12 00:32:10 +01:00
parent 4cdd42de1a
commit ae1890d29a
2 changed files with 51 additions and 21 deletions
+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;
}