* I just checked, and BeOS actually does not update the query this way - this
must have been my very own stupid idea. It's removed now. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33685 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -1620,7 +1620,6 @@ Query::LiveUpdate(Inode* inode, const char* attribute, int32 type,
|
|||||||
status_t newStatus = fExpression->Root()->Match(inode, attribute, type,
|
status_t newStatus = fExpression->Root()->Match(inode, attribute, type,
|
||||||
newKey, newLength);
|
newKey, newLength);
|
||||||
|
|
||||||
const char* name = NULL;
|
|
||||||
bool entryCreated;
|
bool entryCreated;
|
||||||
|
|
||||||
if (oldStatus != MATCH_OK) {
|
if (oldStatus != MATCH_OK) {
|
||||||
@@ -1633,31 +1632,22 @@ Query::LiveUpdate(Inode* inode, const char* attribute, int32 type,
|
|||||||
// entry got removed
|
// entry got removed
|
||||||
entryCreated = false;
|
entryCreated = false;
|
||||||
} else {
|
} else {
|
||||||
// The entry stays in the query - only notify in case the name of the
|
// The entry stays in the query
|
||||||
// inode was changed
|
return;
|
||||||
if (oldKey == NULL || strcmp(attribute, "name") != 0 || newKey == NULL)
|
|
||||||
return;
|
|
||||||
|
|
||||||
notify_query_entry_removed(fPort, fToken, fVolume->ID(),
|
|
||||||
fVolume->ToVnode(inode->Parent()), (const char*)oldKey,
|
|
||||||
inode->ID());
|
|
||||||
name = (const char*)newKey;
|
|
||||||
entryCreated = true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// we may need to get the name of the inode
|
// we may need to get the name of the inode
|
||||||
|
|
||||||
char nameBuffer[B_FILE_NAME_LENGTH];
|
char nameBuffer[B_FILE_NAME_LENGTH];
|
||||||
|
const char* name;
|
||||||
|
|
||||||
if (name == NULL) {
|
if (strcmp(attribute, "name")) {
|
||||||
if (strcmp(attribute, "name")) {
|
if (inode->GetName(nameBuffer) != B_OK)
|
||||||
if (inode->GetName(nameBuffer) != B_OK)
|
nameBuffer[0] = '\0';
|
||||||
nameBuffer[0] = '\0';
|
name = nameBuffer;
|
||||||
name = nameBuffer;
|
} else {
|
||||||
} else {
|
// a shortcut to prevent having to scan the attribute section
|
||||||
// a shortcut to prevent having to scan the attribute section
|
name = (const char*)newKey;
|
||||||
name = (const char*)newKey;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// notify query listeners
|
// notify query listeners
|
||||||
|
|||||||
Reference in New Issue
Block a user