mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-11-25 09:32:46 +00:00
Use library caches folder for BITUpdateManager
This commit is contained in:
parent
2cd3d92536
commit
bb165bdcef
@ -430,18 +430,7 @@ typedef NS_ENUM(NSInteger, BITUpdateAlertViewTag) {
|
||||
|
||||
_fileManager = [[NSFileManager alloc] init];
|
||||
|
||||
// temporary directory for crashes grabbed from PLCrashReporter
|
||||
NSArray *paths = NSSearchPathForDirectoriesInDomains(NSApplicationSupportDirectory, NSUserDomainMask, YES);
|
||||
_updateDir = [[paths objectAtIndex:0] stringByAppendingPathComponent:BITHOCKEY_IDENTIFIER];
|
||||
|
||||
if (![_fileManager fileExistsAtPath:_updateDir]) {
|
||||
NSDictionary *attributes = [NSDictionary dictionaryWithObject: [NSNumber numberWithUnsignedLong: 0755] forKey: NSFilePosixPermissions];
|
||||
NSError *theError = NULL;
|
||||
|
||||
[_fileManager createDirectoryAtPath:_updateDir withIntermediateDirectories: YES attributes: attributes error: &theError];
|
||||
}
|
||||
|
||||
_usageDataFile = [_updateDir stringByAppendingPathComponent:BITHOCKEY_USAGE_DATA];
|
||||
_usageDataFile = [bit_settingsDir() stringByAppendingPathComponent:BITHOCKEY_USAGE_DATA];
|
||||
|
||||
[self loadAppCache];
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user