From 001cc950289adf67c2781a2952c3d0080d1c352f Mon Sep 17 00:00:00 2001 From: Sam Bingner Date: Mon, 28 Oct 2019 11:38:49 -1000 Subject: This is a better source for path --- uicache.mm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/uicache.mm b/uicache.mm index cae99d2..ef7598e 100644 --- a/uicache.mm +++ b/uicache.mm @@ -102,7 +102,7 @@ @interface LSApplicationProxy : NSObject - (NSString*) applicationIdentifier; -- (NSURL*) resourcesDirectoryURL; +- (NSURL*) bundleURL; - (NSDate*) registeredDate; @end @@ -161,7 +161,7 @@ bool appIsRegistered(NSString *path) path = getAppPath(path); if (!path) return false; for (LSApplicationProxy *app in [workspace allApplications]) { - if ([path isEqualToString:[[app resourcesDirectoryURL] path]]) return true; + if ([path isEqualToString:[[app bundleURL] path]]) return true; } return false; } @@ -512,7 +512,7 @@ int optimized_uicache(void) { NSMutableArray *finds = [NSMutableArray new]; if (verbose>1) fprintf(stderr, "Enumerating apps\n"); for (LSApplicationProxy *app in [workspace allApplications]) { - NSString *path = [[app resourcesDirectoryURL] path]; + NSString *path = [[app bundleURL] path]; if (![path hasPrefix:@"/Applications/"]) continue; if (verbose>1) fprintf(stderr, "Checking %s\n", path.lastPathComponent.UTF8String); -- cgit v1.2.3