Was returning an error when attempting to read past the end of

the file. Apparently one must return success but report 0 bytes
read. This should fix the tracker file copy bug Marcus found.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4612 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Tyler Dauwalder
2003-09-10 19:22:54 +00:00
parent c7116c9114
commit 23a4187a2b
+6 -1
View File
@@ -57,8 +57,13 @@ Icb::Read(off_t pos, void *buffer, size_t *length, uint32 *block)
DEBUG_INIT_ETC(CF_PUBLIC | CF_HIGH_VOLUME, "Icb",
("pos: %lld, buffer: %p, length: (%p)->%ld", pos, buffer, length, (length ? *length : 0)));
if (!buffer || !length || uint64(pos) >= Length())
if (!buffer || !length)
RETURN(B_BAD_VALUE);
if (uint64(pos) >= Length()) {
*length = 0;
return B_OK;
}
switch (IcbTag().descriptor_flags()) {
case ICB_DESCRIPTOR_TYPE_SHORT: {