Fix another stupid crash.
This commit is contained in:
1 parent
2e72d6d8ba
commit
7111fa4d4f
2 files changed
+15
-5
No files matched your search
+11
-3
@@ -26,9 +26,17 @@
|
||||
|
||||
[SBPrefsController registerUserDefaults];
|
||||
|
||||
NSString *path = [[NSSearchPathForDirectoriesInDomains(NSApplicationSupportDirectory,
|
||||
NSUserDomainMask,
|
||||
YES) firstObject] stringByAppendingPathComponent:@"Subler/debugLog.txt"];
|
||||
NSString *appSupportPath = [[NSSearchPathForDirectoriesInDomains(NSApplicationSupportDirectory,
|
||||
NSUserDomainMask,
|
||||
YES) firstObject] stringByAppendingPathComponent:@"Subler"];
|
||||
|
||||
if (![[NSFileManager defaultManager] fileExistsAtPath:appSupportPath]) {
|
||||
[[NSFileManager defaultManager] createDirectoryAtPath:appSupportPath withIntermediateDirectories:YES attributes:nil error:NULL];
|
||||
}
|
||||
|
||||
NSString *path = [appSupportPath stringByAppendingPathComponent:@"debugLog.txt"];
|
||||
|
||||
|
||||
|
||||
SBLogger *logger = [[SBLogger alloc] initWithLogFile:[NSURL fileURLWithPath:path]];
|
||||
[logger clearLog];
|
||||
|
||||
Reference in new issue
Block a user