* read package attributes before reading the TOC, as that allows to

take action in the content-handler that depend on the values of
  package attributes

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40490 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Oliver Tappe 2011-02-14 17:23:43 +00:00
parent d662b8345f
commit 36d702ec79
1 changed files with 6 additions and 4 deletions

View File

@ -589,9 +589,10 @@ PackageReaderImpl::ParseContent(BPackageContentHandler* contentHandler)
{
AttributeHandlerContext context(ErrorOutput(), contentHandler);
RootAttributeHandler rootAttributeHandler;
status_t error = _ParseTOC(&context, &rootAttributeHandler);
status_t error
= ParsePackageAttributesSection(&context, &rootAttributeHandler);
if (error == B_OK)
error = ParsePackageAttributesSection(&context, &rootAttributeHandler);
error = _ParseTOC(&context, &rootAttributeHandler);
return error;
}
@ -601,9 +602,10 @@ PackageReaderImpl::ParseContent(BLowLevelPackageContentHandler* contentHandler)
{
AttributeHandlerContext context(ErrorOutput(), contentHandler);
LowLevelAttributeHandler rootAttributeHandler;
status_t error = _ParseTOC(&context, &rootAttributeHandler);
status_t error
= ParsePackageAttributesSection(&context, &rootAttributeHandler);
if (error == B_OK)
error = ParsePackageAttributesSection(&context, &rootAttributeHandler);
error = _ParseTOC(&context, &rootAttributeHandler);
return error;
}