]> git.saurik.com Git - cydia.git/commitdiff
Only copy the keyboard dictionary if it actually exists.
authorJay Freeman (saurik) <saurik@saurik.com>
Wed, 7 Mar 2012 06:57:48 +0000 (22:57 -0800)
committerJay Freeman (saurik) <saurik@saurik.com>
Wed, 7 Mar 2012 07:06:02 +0000 (23:06 -0800)
MobileCydia.mm

index 2212e09685a9f01d02308aba5a5d58931958cdda..2c94da82a42e88554aa3a49078ac19cc569f48ba 100644 (file)
@@ -10633,7 +10633,8 @@ int main(int argc, char *argv[]) {
     setuid(0);
     setgid(0);
 
-    system("mkdir -p /var/root/Library/Keyboard; cp -af /var/mobile/Library/Keyboard/UserDictionary.sqlite /var/root/Library/Keyboard/");
+    if (access("/var/mobile/Library/Keyboard/UserDictionary.sqlite", F_OK) == 0)
+        system("mkdir -p /var/root/Library/Keyboard; cp -af /var/mobile/Library/Keyboard/UserDictionary.sqlite /var/root/Library/Keyboard/");
 
     /*Method alloc = class_getClassMethod([NSObject class], @selector(alloc));
     alloc_ = alloc->method_imp;