read() expects B_IS_A_DIRECTORY on directories that can't be read.
This fixes grep misbehavior with directories. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26186 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -1179,6 +1179,8 @@ bfs_read(fs_volume *_volume, fs_vnode *_node, void *_cookie, off_t pos,
|
|||||||
|
|
||||||
if (!inode->HasUserAccessableStream()) {
|
if (!inode->HasUserAccessableStream()) {
|
||||||
*_length = 0;
|
*_length = 0;
|
||||||
|
if (inode->IsDirectory())
|
||||||
|
RETURN_ERROR(B_IS_A_DIRECTORY);
|
||||||
RETURN_ERROR(B_BAD_VALUE);
|
RETURN_ERROR(B_BAD_VALUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user