From ccb78862fbcb7268958387e2703f409a7f9f4b51 Mon Sep 17 00:00:00 2001 From: Damiano Galassi Date: Sat, 20 Apr 2019 10:50:43 +0200 Subject: [PATCH] Minor optimization. --- MP42/MP42OCRWrapper.mm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/MP42/MP42OCRWrapper.mm b/MP42/MP42OCRWrapper.mm index ab39cd9..1c7499e 100644 --- a/MP42/MP42OCRWrapper.mm +++ b/MP42/MP42OCRWrapper.mm @@ -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;