diff options
author | Jay Freeman (saurik) <saurik@saurik.com> | 2012-06-01 05:31:53 +0000 |
---|---|---|
committer | Jay Freeman (saurik) <saurik@saurik.com> | 2012-06-01 05:31:53 +0000 |
commit | 37e55bd3ab15f915e0b7860ded1b6f6e5aefd249 (patch) | |
tree | bfb728838ee547917e9f0d78a686e9d7efe3bc0e | |
parent | 0183260a5f128e3a0a5331ce89f7e88aa79feb2e (diff) |
Separate unregisters/register, don't interleave.
-rw-r--r-- | uicache.mm | 11 |
1 files changed, 9 insertions, 2 deletions
@@ -116,14 +116,21 @@ int main(int argc, const char *argv[]) { [cache writeToFile:path atomically:YES]; - if (workspace != nil) - for (NSString *bundle in bundles) { + 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:)]) [workspace invalidateIconCache:identifier]; + + for (NSString *identifier in bundles) { + NSString *path([bundles objectForKey:identifier]); [workspace registerApplication:[NSURL fileURLWithPath:path]]; } + } if (false) error: fprintf(stderr, "%s\n", error == nil ? strerror(errno) : [[error localizedDescription] UTF8String]); |