#869 - Configuring cache.db to live in /Library/Caches for iOS

This commit is contained in:
Brad Leege
2015-03-04 09:57:18 -06:00
parent 28228bfae0
commit 4fd4351a2f

View File

@@ -25,7 +25,7 @@
// Returns the path to the default cache database on this system.
const std::string &defaultCacheDatabase() {
static const std::string path = []() -> std::string {
NSArray *paths = NSSearchPathForDirectoriesInDomains(NSLibraryDirectory, NSUserDomainMask, YES);
NSArray *paths = NSSearchPathForDirectoriesInDomains(NSCachesDirectory, NSUserDomainMask, YES);
if ([paths count] == 0) {
// Disable the cache if we don't have a location to write.
return "";