From 1a2f455b7019fb3b8cd06220228db88da28bf7f7 Mon Sep 17 00:00:00 2001 From: "Jay Freeman (saurik)" Date: Thu, 30 Oct 2014 03:40:02 -0700 Subject: Migrate metadata.cb0 to Caches from /var/lib/cydia. --- MobileCydia.mm | 2 +- postinst.mm | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) 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()) -- cgit v1.2.3