From 36d702ec79c871e306cd46221453bd48686247f0 Mon Sep 17 00:00:00 2001 From: Oliver Tappe Date: Mon, 14 Feb 2011 17:23:43 +0000 Subject: [PATCH] * 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 --- src/kits/package/hpkg/PackageReaderImpl.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/kits/package/hpkg/PackageReaderImpl.cpp b/src/kits/package/hpkg/PackageReaderImpl.cpp index fb518ea786..fe08df212b 100644 --- a/src/kits/package/hpkg/PackageReaderImpl.cpp +++ b/src/kits/package/hpkg/PackageReaderImpl.cpp @@ -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; }