Report race on systems without O_DIRECTORY

* src/names.c (collect_and_sort_names): Report ENOTDIR after
successful fstat() but !S_ISDIR.
This commit is contained in:
Pavel Raiskup
2018-07-31 12:13:48 +03:00
committed by Sergey Poznyakoff
parent 577dc34565
commit c1b569d9d6

View File

@@ -1767,6 +1767,11 @@ collect_and_sort_names (void)
name->found_count++;
add_hierarchy_to_namelist (&st, name);
}
else
{
errno = ENOTDIR;
open_diag (name->name);
}
}
}