Skip to content

Commit

Permalink
fileinfo: Don't use non-bundle dirs as possible ancestors (#537)
Browse files Browse the repository at this point in the history
  • Loading branch information
russellhancox committed Feb 1, 2021
1 parent 8b22c85 commit 78643d3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Source/common/SNTFileInfo.m
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,7 @@ - (NSBundle *)findBundleWithAncestor:(BOOL)ancestor {
while (pathComponents.count > 1) {
NSBundle *bndl = [NSBundle bundleWithPath:[NSString pathWithComponents:pathComponents]];
if ([bndl objectForInfoDictionaryKey:@"CFBundleIdentifier"]) {
if (!ancestor ||
if ((!ancestor && bndl.bundlePath.pathExtension.length) ||
[[self allowedAncestorExtensions] containsObject:bndl.bundlePath.pathExtension]) {
bundle = bndl;
}
Expand Down

0 comments on commit 78643d3

Please sign in to comment.