Minor optimization.
This commit is contained in:
1 file changed
+2
-2
@@ -61,7 +61,7 @@ protected:
|
|||||||
YES);
|
YES);
|
||||||
if ([allPaths count]) {
|
if ([allPaths count]) {
|
||||||
NSString *path = [[allPaths lastObject] stringByAppendingPathComponent:@"Subler"];
|
NSString *path = [[allPaths lastObject] stringByAppendingPathComponent:@"Subler"];
|
||||||
URL = [NSURL fileURLWithPath:path];
|
URL = [NSURL fileURLWithPath:path isDirectory:YES];
|
||||||
|
|
||||||
if (URL) {
|
if (URL) {
|
||||||
return URL;
|
return URL;
|
||||||
@@ -77,7 +77,7 @@ protected:
|
|||||||
|
|
||||||
if (URL) {
|
if (URL) {
|
||||||
NSString *path = [[[URL path] stringByAppendingPathComponent:@"tessdata"] stringByAppendingFormat:@"/%@.traineddata", language];
|
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]]) {
|
if ([[NSFileManager defaultManager] fileExistsAtPath:[URL path]]) {
|
||||||
return YES;
|
return YES;
|
||||||
|
|||||||
Reference in new issue
Block a user