]> git.saurik.com Git - cydia.git/commitdiff
The Cytore metadata should have been in ~/Library.
authorJay Freeman (saurik) <saurik@saurik.com>
Thu, 30 Oct 2014 18:19:43 +0000 (11:19 -0700)
committerJay Freeman (saurik) <saurik@saurik.com>
Thu, 30 Oct 2014 18:19:43 +0000 (11:19 -0700)
MobileCydia.mm
postinst.mm

index c57910f9aab8761c2f5d16422b46acf1655ef369..ab00331c1ef3bb543bc54e4b290daa26917e103b 100644 (file)
@@ -10472,7 +10472,8 @@ int main(int argc, char *argv[]) {
     _root(CydiaWriteSources());
 
     _trace();
     _root(CydiaWriteSources());
 
     _trace();
-    MetaFile_.Open([Cache("metadata.cb0") UTF8String]);
+    mkdir("/var/mobile/Library/Cydia", 0755);
+    MetaFile_.Open("/var/mobile/Library/Cydia/metadata.cb0");
     _trace();
 
     if (Packages_ != nil) {
     _trace();
 
     if (Packages_ != nil) {
index c6dd96500f03faf14fc2718674a0a92d5c223ec5..55739e0dc6200d843627a1a526dfb65fab453e88 100644 (file)
@@ -180,11 +180,20 @@ int main(int argc, const char *argv[]) {
         system("chown -R 501.501 " NewCache_ "/lists");
     }
 
         system("chown -R 501.501 " NewCache_ "/lists");
     }
 
-    if (access(NewCache_ "/metadata.cb0", F_OK) != 0 && errno == ENOENT)
-        if (access("/var/lib/cydia/metadata.cb0", F_OK) == 0) {
-            system("mv /var/lib/cydia/metadata.cb0 " NewCache_);
-            chown(NewCache_ "/metadata.cb0", 501, 501);
-        }
+    #define OldLibrary_ "/var/lib/cydia"
+
+    #define NewLibrary_ "/var/mobile/Library/Cydia"
+    system("cd /; su -c 'mkdir -p " NewLibrary_ "' mobile");
+
+    #define Cytore_ "/metadata.cb0"
+
+    if (access(NewLibrary_ Cytore_, F_OK) != 0 && errno == ENOENT) {
+        if (access(NewCache_ Cytore_, F_OK) == 0)
+            system("mv -f " NewCache_ Cytore_ " " NewLibrary_);
+        else if (access(OldLibrary_ Cytore_, F_OK) == 0)
+            system("mv -f " OldLibrary_ Cytore_ " " NewLibrary_);
+        chown(NewLibrary_ Cytore_, 501, 501);
+    }
 
     FixPermissions();
 
 
     FixPermissions();