Minor optimization.

This commit is contained in:
Damiano Galassi committed 2019-04-20 10:50:43 +02:00
1 parent 35cfdac88b
commit ccb78862fb
1 file changed
+2 -2
+2 -2
View File
@@ -61,7 +61,7 @@ protected:
YES);
if ([allPaths count]) {
NSString *path = [[allPaths lastObject] stringByAppendingPathComponent:@"Subler"];
URL = [NSURL fileURLWithPath:path];
URL = [NSURL fileURLWithPath:path isDirectory:YES];
if (URL) {
return URL;
@@ -77,7 +77,7 @@ protected:
if (URL) {
NSString *path = [[[URL path] stringByAppendingPathComponent:@"tessdata"] stringByAppendingFormat:@"/%@.traineddata", language];
URL = [NSURL fileURLWithPath:path];
URL = [NSURL fileURLWithPath:path isDirectory:NO];
if ([[NSFileManager defaultManager] fileExistsAtPath:[URL path]]) {
return YES;