diff options
author | Russ Cox <rsc@swtch.com> | 2008-07-04 02:54:06 -0400 |
---|---|---|
committer | Russ Cox <rsc@swtch.com> | 2008-07-04 02:54:06 -0400 |
commit | 4712e22300315fcad068cc611de6866bb1e2a502 (patch) | |
tree | 4f3c3f5ae18e365a54f91e54aaa0900b9581654c /src | |
parent | d07db89b00a55db3ca9c3577422cbd9be722dae6 (diff) | |
download | plan9port-4712e22300315fcad068cc611de6866bb1e2a502.tar.gz plan9port-4712e22300315fcad068cc611de6866bb1e2a502.tar.bz2 plan9port-4712e22300315fcad068cc611de6866bb1e2a502.zip |
lib9: use symlink size, not target size, in dirstat
Diffstat (limited to 'src')
-rw-r--r-- | src/lib9/_p9dir.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/lib9/_p9dir.c b/src/lib9/_p9dir.c index c7578a51..bc54d677 100644 --- a/src/lib9/_p9dir.c +++ b/src/lib9/_p9dir.c @@ -203,8 +203,10 @@ _p9dir(struct stat *lst, struct stat *st, char *name, Dir *d, char **str, char * 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)) |