From d39058c7be405944fa1a172f39e5168fb9cef866 Mon Sep 17 00:00:00 2001 From: Chris Araman Date: Sun, 9 May 2021 13:23:34 -0700 Subject: [PATCH] =?UTF-8?q?=F0=9F=8F=A1=20Ignore=20applications=20moved=20?= =?UTF-8?q?outside=20the=20system=20Applications=20folder?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes #309. --- Sources/MasKit/Controllers/MasAppLibrary.swift | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Sources/MasKit/Controllers/MasAppLibrary.swift b/Sources/MasKit/Controllers/MasAppLibrary.swift index c87befa..12d9df1 100644 --- a/Sources/MasKit/Controllers/MasAppLibrary.swift +++ b/Sources/MasKit/Controllers/MasAppLibrary.swift @@ -15,7 +15,9 @@ class MasAppLibrary: AppLibrary { /// Array of installed software products. lazy var installedApps: [SoftwareProduct] = { - softwareMap.allSoftwareProducts() + softwareMap.allSoftwareProducts().filter { product in + product.bundlePath.starts(with: "/Applications/") + } }() /// Internal initializer for providing a mock software map.