Skip to content
Snippets Groups Projects
Commit e164227c authored by George Nachman's avatar George Nachman
Browse files

Fix a crash when the app support directory couldn't be found and crashlog the reason

parent 9852cc82
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -111,7 +111,7 @@ NSString * const DirectoryLocationDomain = @"DirectoryLocationDomain";
appendPathComponent:executableName
error:&error];
if (!result) {
NSLog(@"Unable to find or create application support directory:\n%@", error);
ELog(@"Unable to find or create application support directory:\n%@", error);
}
return result;
}
Loading
Loading
@@ -123,7 +123,7 @@ NSString * const DirectoryLocationDomain = @"DirectoryLocationDomain";
appendPathComponent:@"iTerm"
error:&error];
if (!result) {
NSLog(@"Unable to find or create application support directory:\n%@", error);
ELog(@"Unable to find or create application support directory:\n%@", error);
}
return result;
}
Loading
Loading
Loading
Loading
@@ -38,9 +38,14 @@
- (instancetype)init {
self = [super init];
if (self) {
_events = [[SCEvents alloc] init];
_events.delegate = self;
[_events startWatchingPaths:@[ [self dynamicProfilesPath] ]];
NSString *path = [self dynamicProfilesPath];
if (path == nil) {
ELog(@"Dynamic profiles path is nil");
return nil;
}
_events = [[SCEvents alloc] init];
_events.delegate = self;
[_events startWatchingPaths:@[ path ]];
}
return self;
}
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment