reads now returns B_IS_A_DIRECTORY instead of B_BAD_VALUE for directories
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26267 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -436,8 +436,13 @@ reiserfs_read(fs_volume *fs, fs_vnode *_node, void *cookie, off_t pos,
|
|||||||
*bufferSize));
|
*bufferSize));
|
||||||
status_t error = B_OK;
|
status_t error = B_OK;
|
||||||
// don't read anything but files
|
// don't read anything but files
|
||||||
if (!node->IsFile())
|
if (!node->IsFile()) {
|
||||||
error = B_BAD_VALUE;
|
if (node->IsDir())
|
||||||
|
error = B_IS_A_DIRECTORY;
|
||||||
|
else
|
||||||
|
error = B_BAD_VALUE;
|
||||||
|
}
|
||||||
|
|
||||||
// read
|
// read
|
||||||
StreamReader *reader = (StreamReader*)cookie;
|
StreamReader *reader = (StreamReader*)cookie;
|
||||||
if (error == B_OK) {
|
if (error == B_OK) {
|
||||||
|
|||||||
Reference in New Issue
Block a user