diff options
author | Jay Freeman (saurik) <saurik@saurik.com> | 2010-07-30 10:06:49 +0000 |
---|---|---|
committer | Jay Freeman (saurik) <saurik@saurik.com> | 2010-07-30 10:06:49 +0000 |
commit | 7e0ec87a1c6cc62738348fe93656b5a4d81633a3 (patch) | |
tree | 3abf7640ffd51f8592d9b239efe6d817d2b41ee4 | |
parent | 250ccb19b3104102d52a65de0065f6afaf2fc1a5 (diff) |
Delete the icon caches.
-rw-r--r-- | control | 2 | ||||
-rw-r--r-- | uicache.mm | 14 |
2 files changed, 14 insertions, 2 deletions
@@ -4,7 +4,7 @@ Section: Utilities Installed-Size: %S Maintainer: Jay Freeman (saurik) <saurik@saurik.com> Architecture: iphoneos-arm -Version: 1.0.3198-1 +Version: 1.0.3201-1 Description: UIKit/GraphicsServices command line access Name: UIKit Tools Author: Jay Freeman (saurik) <saurik@saurik.com> @@ -37,7 +37,8 @@ int main() { NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; - NSString *path([NSString stringWithFormat:@"%@/Library/Caches/com.apple.mobile.installation.plist", NSHomeDirectory()]); + NSString *home(NSHomeDirectory()); + NSString *path([NSString stringWithFormat:@"%@/Library/Caches/com.apple.mobile.installation.plist", home]); Class $LSApplicationWorkspace(objc_getClass("LSApplicationWorkspace")); LSApplicationWorkspace *workspace($LSApplicationWorkspace == nil ? nil : [$LSApplicationWorkspace defaultWorkspace]); @@ -84,6 +85,17 @@ int main() { fprintf(stderr, "%s\n", error == nil ? strerror(errno) : [[error localizedDescription] UTF8String]); } else fprintf(stderr, "cannot open cache file. incorrect user?\n"); + unlink([[NSString stringWithFormat:@"%@/Library/Caches/com.apple.springboard-imagecache-icons"] UTF8String]); + unlink([[NSString stringWithFormat:@"%@/Library/Caches/com.apple.springboard-imagecache-icons.plist"] UTF8String]); + + unlink([[NSString stringWithFormat:@"%@/Library/Caches/com.apple.springboard-imagecache-smallicons"] UTF8String]); + unlink([[NSString stringWithFormat:@"%@/Library/Caches/com.apple.springboard-imagecache-smallicons.plist"] UTF8String]); + + system([[NSString stringWithFormat:@"rm -rf %@/Library/Caches/SpringBoardIconCache"] UTF8String]); + system([[NSString stringWithFormat:@"rm -rf %@/Library/Caches/SpringBoardIconCache-small"] UTF8String]); + + system([[NSString stringWithFormat:@"rm -rf %@/Library/Caches/com.apple.IconsCache"] UTF8String]); + notify_post("com.apple.mobile.application_installed"); [pool release]; |