summaryrefslogtreecommitdiff
path: root/postinst.mm
diff options
context:
space:
mode:
authorJay Freeman (saurik) <saurik@saurik.com>2014-10-30 03:39:21 -0700
committerJay Freeman (saurik) <saurik@saurik.com>2014-10-30 03:39:21 -0700
commit4cfa3e5b08fdefca9a9f14df6b5ab8c8ea6d4e99 (patch)
tree307afb0a9767ef29996cdd4468a92fe3d638976f /postinst.mm
parent9571d210def31bf64543521d5939da414d663c86 (diff)
Move Caches creation outside of file conditionals.
Diffstat (limited to 'postinst.mm')
-rw-r--r--postinst.mm3
1 files changed, 2 insertions, 1 deletions
diff --git a/postinst.mm b/postinst.mm
index 10988bb..d837d7b 100644
--- a/postinst.mm
+++ b/postinst.mm
@@ -173,8 +173,9 @@ int main(int argc, const char *argv[]) {
system("rm -rf " OldCache_);
#define NewCache_ "/var/mobile/Library/Caches/com.saurik.Cydia"
+ system("cd /; su -c 'mkdir -p " NewCache_ "' mobile");
+
if (access(NewCache_ "/lists", F_OK) != 0 && errno == ENOENT) {
- system("cd /; su -c 'mkdir -p " NewCache_ "' mobile");
system("cp -at " NewCache_ " /var/lib/apt/lists");
system("chown -R 501.501 " NewCache_ "/lists");
}