summaryrefslogtreecommitdiff
path: root/Sources.mm
diff options
context:
space:
mode:
authorJay Freeman (saurik) <saurik@saurik.com>2019-05-19 17:29:26 -0700
committerJay Freeman (saurik) <saurik@saurik.com>2019-05-19 17:29:26 -0700
commit0a49c9d7028bea50d6d73f313c286f608a84b71b (patch)
treecf64f1833040ff6a31084be5c67fd31d1e172bda /Sources.mm
parent5735c325ca335a79f28d2e20b77629c6e1f0f080 (diff)
Remove all broken hardcoded usage of Cache folder.
Diffstat (limited to 'Sources.mm')
-rw-r--r--Sources.mm11
1 files changed, 9 insertions, 2 deletions
diff --git a/Sources.mm b/Sources.mm
index a156ee2..418ea08 100644
--- a/Sources.mm
+++ b/Sources.mm
@@ -28,11 +28,18 @@
#include "Sources.h"
+NSString *Cache_;
+
+NSString *Cache(const char *file) {
+ return [NSString stringWithFormat:@"%@/%s", Cache_, file];
+}
+
extern _H<NSMutableDictionary> Sources_;
void CydiaWriteSources() {
- unlink(SOURCES_LIST);
- FILE *file(fopen(SOURCES_LIST, "w"));
+ auto sources([SOURCES_LIST UTF8String]);
+ unlink(sources);
+ FILE *file(fopen(sources, "w"));
_assert(file != NULL);
fprintf(file, "deb http://apt.saurik.com/ ios/%.2f main\n", kCFCoreFoundationVersionNumber);