lib9: use symlink size, not target size, in dirstat
This commit is contained in:
parent
d07db89b00
commit
4712e22300
1 changed files with 3 additions and 1 deletions
|
|
@ -203,8 +203,10 @@ _p9dir(struct stat *lst, struct stat *st, char *name, Dir *d, char **str, char *
|
||||||
d->mode |= DMDIR;
|
d->mode |= DMDIR;
|
||||||
d->qid.type = QTDIR;
|
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->mode |= DMSYMLINK;
|
||||||
|
d->length = lst->st_size;
|
||||||
|
}
|
||||||
if(S_ISFIFO(st->st_mode))
|
if(S_ISFIFO(st->st_mode))
|
||||||
d->mode |= DMNAMEDPIPE;
|
d->mode |= DMNAMEDPIPE;
|
||||||
if(S_ISSOCK(st->st_mode))
|
if(S_ISSOCK(st->st_mode))
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue