BFS: Fixed readdir() again.
* We still need to return B_BUFFER_OVERFLOW if the passed in buffer was smaller than INODE_FILE_NAME_LENGTH, as that's what must be expected from the caller.
This commit is contained in:
@@ -2744,7 +2744,7 @@ TreeIterator::Traverse(int8 direction, void* key, uint16* keyLength,
|
||||
// include the termination for string types
|
||||
bool needsTermination = fTree->fHeader.DataType() == BPLUSTREE_STRING_TYPE;
|
||||
if (length + (needsTermination ? 1 : 0) > maxLength) {
|
||||
if (!needsTermination) {
|
||||
if (!needsTermination || maxLength < INODE_FILE_NAME_LENGTH) {
|
||||
// The buffer is too small, restore the last key and return
|
||||
// an error
|
||||
fCurrentNodeOffset = savedNodeOffset;
|
||||
|
||||
Reference in New Issue
Block a user