commit 367a887c7ef88a3899ecddf946802ff3d3f6f759 from: Marcel Rodrigues date: Fri Jun 05 14:14:50 2015 UTC Check whether symlink target is a directory. Previously we're using lstat() to make file sizes reflect the actual size occupied by an entry (symbolic links are just small references). However, we need to dereference links in order to know the correct type of their target. commit - c8d8e76b74bd1cc482dfabc8f05adfae01524f4f commit + 367a887c7ef88a3899ecddf946802ff3d3f6f759 blob - 54e68b7752e95a42a1a8a33b632e9955cd9d1c68 blob + 7bed83348d81e26990d3297c869fc9a1ccbfc5bd --- rover.c +++ rover.c @@ -454,7 +454,7 @@ ls(Row **rowsp, uint8_t flags) continue; if (!(flags & SHOW_HIDDEN) && ep->d_name[0] == '.') continue; - lstat(ep->d_name, &statbuf); + stat(ep->d_name, &statbuf); if (S_ISDIR(statbuf.st_mode)) { if (flags & SHOW_DIRS) { rows[i].name = malloc(strlen(ep->d_name) + 2);