]> git.saurik.com Git - uikittools.git/commitdiff
Delete the icon caches.
authorJay Freeman (saurik) <saurik@saurik.com>
Fri, 30 Jul 2010 10:06:49 +0000 (10:06 +0000)
committerJay Freeman (saurik) <saurik@saurik.com>
Fri, 30 Jul 2010 10:06:49 +0000 (10:06 +0000)
control
uicache.mm

diff --git a/control b/control
index bc6448de7507119e98bdb1ca57358c5900291423..029866b8cd0e84673f11d3a80fd8842f09967fca 100644 (file)
--- a/control
+++ b/control
@@ -4,7 +4,7 @@ Section: Utilities
 Installed-Size: %S
 Maintainer: Jay Freeman (saurik) <saurik@saurik.com>
 Architecture: iphoneos-arm
 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>
 Description: UIKit/GraphicsServices command line access
 Name: UIKit Tools
 Author: Jay Freeman (saurik) <saurik@saurik.com>
index 4b477c6668a01101308ab57e5c601af8c8f6b4cf..cf88535547a8dc241269b885928991c46cb6013a 100644 (file)
@@ -37,7 +37,8 @@
 int main() {
     NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
 
 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]);
 
     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");
 
             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];
     notify_post("com.apple.mobile.application_installed");
 
     [pool release];