Avoid a spurious warning for each whiteout found during "ls -lW".

# ls -lW
total 2
-rw-r--r--  1 root  wheel  6 Oct 18 14:46 file1
ls: ./file2: No such file or directory
w---------  0 root  wheel  0 Jan  1  1970 file2
This commit is contained in:
ru 2006-10-18 10:58:27 +00:00
parent 2d9b623d37
commit 5968c5802f

View File

@ -628,9 +628,10 @@ aclmode(char *buf, const FTSENT *p, int *haveacls)
p->fts_parent->fts_accpath, p->fts_name);
/*
* We have no way to tell whether a symbolic link has an ACL since
* pathconf() and acl_get_file() both follow them.
* pathconf() and acl_get_file() both follow them. They also don't
* support whiteouts.
*/
if (S_ISLNK(p->fts_statp->st_mode)) {
if (S_ISLNK(p->fts_statp->st_mode) || S_ISWHT(p->fts_statp->st_mode)) {
*haveacls = 1;
return;
}