lstat instead of stat for UNKNOWN stats

This commit is contained in:
Axel Kittenberger 2011-02-11 14:40:05 +00:00
parent 9096fc9686
commit b1aa47e816
1 changed files with 1 additions and 1 deletions

View File

@ -1078,7 +1078,7 @@ l_readdir (lua_State *L)
strcpy(entry, dirname);
strcat(entry, "/");
strcat(entry, de->d_name);
stat(entry, &st);
lstat(entry, &st);
isdir = S_ISDIR(st.st_mode);
free(entry);
} else {