Minor optimization.
This commit is contained in:
1 file changed
+2
-2
@@ -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;
|
||||
|
||||
Reference in new issue
Block a user