diff options
author | Jay Freeman (saurik) <saurik@saurik.com> | 2014-10-30 03:40:02 -0700 |
---|---|---|
committer | Jay Freeman (saurik) <saurik@saurik.com> | 2014-10-30 03:40:02 -0700 |
commit | 1a2f455b7019fb3b8cd06220228db88da28bf7f7 (patch) | |
tree | 8c8878c07356ab98f773639841691c2b83487642 | |
parent | 4cfa3e5b08fdefca9a9f14df6b5ab8c8ea6d4e99 (diff) |
Migrate metadata.cb0 to Caches from /var/lib/cydia.
-rw-r--r-- | MobileCydia.mm | 2 | ||||
-rw-r--r-- | postinst.mm | 6 |
2 files changed, 7 insertions, 1 deletions
diff --git a/MobileCydia.mm b/MobileCydia.mm index 5d84d6d..af4dfb3 100644 --- a/MobileCydia.mm +++ b/MobileCydia.mm @@ -10456,7 +10456,7 @@ int main(int argc, char *argv[]) { _root(CydiaWriteSources()); _trace(); - _root(MetaFile_.Open("/var/lib/cydia/metadata.cb0")); + MetaFile_.Open([Cache("metadata.cb0") UTF8String]); _trace(); if (Packages_ != nil) { diff --git a/postinst.mm b/postinst.mm index d837d7b..c6dd965 100644 --- a/postinst.mm +++ b/postinst.mm @@ -180,6 +180,12 @@ 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); + } + FixPermissions(); if (FixApplications()) |