diff options
Diffstat (limited to 'hurd/lookup-retry.c')
-rw-r--r-- | hurd/lookup-retry.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/hurd/lookup-retry.c b/hurd/lookup-retry.c index 12b5c30962..b596848624 100644 --- a/hurd/lookup-retry.c +++ b/hurd/lookup-retry.c @@ -147,6 +147,8 @@ __hurd_file_name_lookup_retry (error_t (*use_init_port) err = __io_stat (*result, &st); if (!err) { + if (flags & O_DIRECTORY && !S_ISDIR (st.st_mode)) + err = ENOTDIR; if (S_ISLNK (st.st_mode)) err = ELOOP; else if (st.st_mode & (S_IPTRANS|S_IATRANS)) |