start adding DM bits
This commit is contained in:
parent
8a26417b7a
commit
0a22905232
4 changed files with 16 additions and 8 deletions
|
|
@ -82,10 +82,14 @@ dirpackage(int fd, char *buf, int n, Dir **dp)
|
|||
de = (struct dirent*)p;
|
||||
if(de->d_name[0] == 0)
|
||||
/* nothing */ {}
|
||||
else if(stat(de->d_name, &st) < 0)
|
||||
else if(lstat(de->d_name, &lst) < 0)
|
||||
de->d_name[0] = 0;
|
||||
else
|
||||
nstr += _p9dir(&st, de->d_name, nil, nil, nil);
|
||||
else{
|
||||
st = lst;
|
||||
if((lst.st_mode&S_IFMT) == S_ISLNK)
|
||||
stat(de->d_name, &st);
|
||||
nstr += _p9dir(&lst, &st, de->d_name, nil, nil, nil);
|
||||
}
|
||||
p += de->d_reclen;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue