Skip to content

Commit

Permalink
Tweak the directory scanner to use the new QSTypeConformsTo function
Browse files Browse the repository at this point in the history
  • Loading branch information
pjrobertson committed Dec 6, 2013
1 parent d4cf636 commit d8f2690
Showing 1 changed file with 3 additions and 3 deletions.
Expand Up @@ -36,7 +36,7 @@ - (NSArray *)objectsFromPath:(NSString *)path withSettings:(NSDictionary *)setti
NSMutableArray *excludedTypes = [NSMutableArray array];
for (NSString *excludedType in [settings objectForKey:kItemExcludeFiletypes]) {
NSString *realType = QSUTIForAnyTypeString(excludedType);
if (!realType) {
if (!realType && !QSIsUTI(excludedType)) {
realType = QSUTIForExtensionOrType(excludedType, 0);
}
[excludedTypes addObject:(realType ? realType : excludedType)];
Expand Down Expand Up @@ -89,14 +89,14 @@ - (NSArray *)objectsFromPath:(NSString *)path depth:(NSInteger)depth types:(NSAr
include = YES;
} else {
for(NSString * requiredType in types) {
if (UTTypeConformsTo((CFStringRef)type, (CFStringRef)requiredType)) {
if (QSTypeConformsTo(type, requiredType)) {
include = YES;
break;
}
}
}
for (NSString *excludedType in excludedTypes) {
if (UTTypeConformsTo((CFStringRef)type, (CFStringRef)excludedType)) {
if (QSTypeConformsTo(type, excludedType)) {
include = NO;
}
}
Expand Down

0 comments on commit d8f2690

Please sign in to comment.