summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJay Freeman (saurik) <saurik@saurik.com>2014-10-30 11:19:43 -0700
committerJay Freeman (saurik) <saurik@saurik.com>2014-10-30 11:19:43 -0700
commita4a93d599b06516cc112ca683409db0dc619600d (patch)
treeef6aa1afd6f3aa9a857a1181ef5cc2dca275fa5a
parentf98962e5a9e0baa28f1fca154ebaa33c52bfb654 (diff)
The Cytore metadata should have been in ~/Library.
-rw-r--r--MobileCydia.mm3
-rw-r--r--postinst.mm19
2 files changed, 16 insertions, 6 deletions
diff --git a/MobileCydia.mm b/MobileCydia.mm
index c57910f..ab00331 100644
--- a/MobileCydia.mm
+++ b/MobileCydia.mm
@@ -10472,7 +10472,8 @@ int main(int argc, char *argv[]) {
_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) {
diff --git a/postinst.mm b/postinst.mm
index c6dd965..55739e0 100644
--- a/postinst.mm
+++ b/postinst.mm
@@ -180,11 +180,20 @@ int main(int argc, const char *argv[]) {
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();