From 16f2f8eb8109b35c2151baa05afcfd15875077a5 Mon Sep 17 00:00:00 2001 From: Andrew Lindesay Date: Tue, 2 Jun 2020 18:20:19 +1200 Subject: [PATCH] HaikuDepot: Contents for Local Pkg (b) Fixes a bug where contents are not displayed for local files that are not installed. Resolves #16161 Change-Id: I27abfd78bf7882b1961f8d9c6ade30d4c15ec2ad Reviewed-on: https://review.haiku-os.org/c/haiku/+/2865 Reviewed-by: waddlesplash --- src/apps/haikudepot/ui/PackageContentsView.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/apps/haikudepot/ui/PackageContentsView.cpp b/src/apps/haikudepot/ui/PackageContentsView.cpp index 0a29ce0fec..3fa151cb08 100644 --- a/src/apps/haikudepot/ui/PackageContentsView.cpp +++ b/src/apps/haikudepot/ui/PackageContentsView.cpp @@ -302,11 +302,13 @@ PackageContentsView::SetPackage(const PackageInfoRef& package) fLastPackageState = package.Get() != NULL ? package->State() : NONE; } - // if the package is not installed then there is no point in attempting to - // populate data for it. + // if the package is not installed and is not a local file on disk then + // there is no point in attempting to populate data for it. - if (package.Get() != NULL && package->State() == ACTIVATED) + if (package.Get() != NULL + && (package->State() == ACTIVATED || package->IsLocalFile())) { release_sem_etc(fContentPopulatorSem, 1, 0); + } }