summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam Bingner <sam@bingner.com>2019-10-28 11:38:49 -1000
committerSam Bingner <sam@bingner.com>2019-10-28 11:38:49 -1000
commit001cc950289adf67c2781a2952c3d0080d1c352f (patch)
tree6c7395ce58ab2bc3399ccdf0d86a19d927f3fb7b
parent49e531bd7cebb01088233374dda28b7be40a4343 (diff)
This is a better source for path
-rw-r--r--uicache.mm6
1 files 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);