diff --git a/Mini vMac/MYOSGLUE.m b/Mini vMac/MYOSGLUE.m index 068d1c1..f12dcad 100644 --- a/Mini vMac/MYOSGLUE.m +++ b/Mini vMac/MYOSGLUE.m @@ -102,8 +102,15 @@ LOCALFUNC blnr FindNamedChildFilePath(NSString *parentPath, char *ChildName, NSS NSFileManager *fm = [NSFileManager defaultManager]; BOOL isDirectory; if ([fm fileExistsAtPath:parentPath isDirectory:&isDirectory] && isDirectory) { - *childPath = [parentPath stringByAppendingPathComponent:@(ChildName)]; - return trueblnr; + NSString *searchString = @(ChildName).lowercaseString; + *childPath = NULL; + [[fm contentsOfDirectoryAtPath:parentPath error:NULL] enumerateObjectsUsingBlock:^(NSString * _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) { + if ([obj.lowercaseString isEqualToString:searchString]) { + *stop = YES; + *childPath = [parentPath stringByAppendingPathComponent:obj]; + } + }]; + return *childPath != NULL; } else { return falseblnr; }