commit 4712e22300315fcad068cc611de6866bb1e2a502 from: Russ Cox date: Fri Jul 04 06:54:06 2008 UTC lib9: use symlink size, not target size, in dirstat commit - d07db89b00a55db3ca9c3577422cbd9be722dae6 commit + 4712e22300315fcad068cc611de6866bb1e2a502 blob - c7578a51168cdbb5b567cd38c4114425f19d5f2d blob + bc54d677461b31531ef46ff392cb3e9edf974c4e --- src/lib9/_p9dir.c +++ src/lib9/_p9dir.c @@ -203,8 +203,10 @@ _p9dir(struct stat *lst, struct stat *st, char *name, d->mode |= DMDIR; d->qid.type = QTDIR; } - if(S_ISLNK(lst->st_mode)) /* yes, lst not st */ + if(S_ISLNK(lst->st_mode)){ /* yes, lst not st */ d->mode |= DMSYMLINK; + d->length = lst->st_size; + } if(S_ISFIFO(st->st_mode)) d->mode |= DMNAMEDPIPE; if(S_ISSOCK(st->st_mode))