packagefs: UnpackingAttributeCookie: Open package
... when reading non-inline attribute data. Generally the package should already have been opened by the PackageNode owning the attribute (in InitVFS()), but that isn't the case for queries, which can read attributes from entirely unsuspecting nodes. Together with the QueryParser fix that should fix queries involving non-indexed attributes.
This commit is contained in:
parent
10e9f49914
commit
b23d504796
|
@ -128,8 +128,14 @@ UnpackingAttributeCookie::ReadAttribute(PackageNode* packageNode,
|
|||
return read_package_data(data, &dataReader, offset, buffer, bufferSize);
|
||||
}
|
||||
|
||||
// data not inline -- let the package create a data reader for us
|
||||
// data not inline -- open the package and let it create a data reader for
|
||||
// us
|
||||
Package* package = packageNode->GetPackage();
|
||||
int fd = package->Open();
|
||||
if (fd < 0)
|
||||
RETURN_ERROR(fd);
|
||||
PackageCloser packageCloser(package);
|
||||
|
||||
BAbstractBufferedDataReader* reader;
|
||||
status_t error = package->CreateDataReader(data, reader);
|
||||
if (error != B_OK)
|
||||
|
|
Loading…
Reference in New Issue