commit f1e9b90ed2e6e26ae077acb63d126d20517ac385 from: Marcel Rodrigues date: Mon Mar 30 15:33:18 2015 UTC Use lstat() to get correct size of symlinks. commit - c04b0d8972007057cbc0fab5141cc49afd1ecc3f commit + f1e9b90ed2e6e26ae077acb63d126d20517ac385 blob - 834c96a164942829e3a2547d3d3cce40a4b56fa0 blob + 280348bdd33e62ba096e14d6e0bb6fd72cef9fdf --- rover.c +++ rover.c @@ -367,8 +367,7 @@ ls(Row **rowsp, uint8_t flags) continue; if (!(flags & SHOW_HIDDEN) && ep->d_name[0] == '.') continue; - /* FIXME: POSIX < 200112L doesn't have lstat(). How do we handle symlinks? */ - stat(ep->d_name, &statbuf); + lstat(ep->d_name, &statbuf); if (S_ISDIR(statbuf.st_mode)) { if (flags & SHOW_DIRS) { rows[i].name = malloc(strlen(ep->d_name) + 2);