summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJay Freeman (saurik) <saurik@saurik.com>2012-03-06 22:57:48 -0800
committerJay Freeman (saurik) <saurik@saurik.com>2012-03-06 23:06:02 -0800
commit57f0b05d173f38e3f57494b84c895cfeaf9f3091 (patch)
tree7454179ce2bfd5aec4bde37fc884bc227955ee3c
parent43e103a23a53e953af9f7968342549f27d14cff6 (diff)
Only copy the keyboard dictionary if it actually exists.
-rw-r--r--MobileCydia.mm3
1 files changed, 2 insertions, 1 deletions
diff --git a/MobileCydia.mm b/MobileCydia.mm
index 2212e09..2c94da8 100644
--- a/MobileCydia.mm
+++ b/MobileCydia.mm
@@ -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;