From 97b54c51a985afce00d04b166a3f242a66b89391 Mon Sep 17 00:00:00 2001 From: "Jay Freeman (saurik)" Date: Thu, 13 Sep 2012 04:26:58 +0000 Subject: [PATCH] Do not unregister apps if we can invalidate icons. --- uicache.mm | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/uicache.mm b/uicache.mm index c7510d0..08d00c5 100644 --- a/uicache.mm +++ b/uicache.mm @@ -125,14 +125,15 @@ int main(int argc, const char *argv[]) { [cache writeToFile:path atomically:YES]; if (workspace != nil) { - for (NSString *identifier in bundles) { - NSString *path([bundles objectForKey:identifier]); - [workspace unregisterApplication:[NSURL fileURLWithPath:path]]; - } - - for (NSString *identifier in bundles) - if ([workspace respondsToSelector:@selector(invalidateIconCache:)]) + if ([workspace respondsToSelector:@selector(invalidateIconCache:)]) { + for (NSString *identifier in bundles) [workspace invalidateIconCache:identifier]; + } else { + for (NSString *identifier in bundles) { + NSString *path([bundles objectForKey:identifier]); + [workspace unregisterApplication:[NSURL fileURLWithPath:path]]; + } + } for (NSString *identifier in bundles) { NSString *path([bundles objectForKey:identifier]); -- 2.45.2