Permalink
Browse files

Merge pull request #909 from ffried/master

Fix DDLogFileManagerDefault -isLogFile:
  • Loading branch information...
2 parents 0ea9dcb + d1eef54 commit a1e06a7757384337cb70c2f8b139b88a92184e02 @rivera-ernesto rivera-ernesto committed Jan 8, 2018
Showing with 2 additions and 1 deletion.
  1. +2 −1 Classes/DDFileLogger.m
View
@@ -279,7 +279,8 @@ - (NSString *)logsDirectory {
- (BOOL)isLogFile:(NSString *)fileName {
NSString *appName = [self applicationName];
- BOOL hasProperPrefix = [fileName hasPrefix:appName];
+ // We need to add a space to the name as otherwise we could match applications that have the name prefix.
+ BOOL hasProperPrefix = [fileName hasPrefix:[appName stringByAppendingString:@" "]];
BOOL hasProperSuffix = [fileName hasSuffix:@".log"];
return (hasProperPrefix && hasProperSuffix);

0 comments on commit a1e06a7

Please sign in to comment.