Added a few comments and ToDo items.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2167 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler 2002-12-06 04:32:48 +00:00
parent 697df4613d
commit 1d5f9787e8

View File

@ -689,6 +689,10 @@ Inode::WriteAttribute(Transaction *transaction, const char *name, int32 type, of
uint8 oldBuffer[BPLUSTREE_MAX_KEY_LENGTH], *oldData = NULL;
size_t oldLength = 0;
// ToDo: we actually depend on that the contents of "buffer" are constant
// if they get changed during the write (hey, user programs), we may mess
// up our index trees!
Index index(fVolume);
bool hasIndex = index.SetTo(name) == B_OK;
@ -729,8 +733,9 @@ Inode::WriteAttribute(Transaction *transaction, const char *name, int32 type, of
if (attribute->ReadAt(0, oldBuffer, &oldLength) == B_OK)
oldData = oldBuffer;
}
// ToDo: check if the data fits in the inode now and delete the file if so
status = attribute->WriteAt(transaction, pos, buffer, _length);
attribute->Lock().UnlockWrite();
} else
status = B_ERROR;