Skip to content

Commit

Permalink
Merge pull request ldiqual#4 from hiltonc/master
Browse files Browse the repository at this point in the history
Create documents directory when needed for tessdata
  • Loading branch information
ldiqual committed Jan 2, 2013
2 parents 9ee2dbf + 3da034c commit 4f93be0
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions Classes/Tesseract.mm
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ - (void)copyDataToDocumentsDirectory {
NSString *bundlePath = [[NSBundle bundleForClass:[self class]] bundlePath];
NSString *tessdataPath = [bundlePath stringByAppendingPathComponent:_dataPath];
if (tessdataPath) {
[fileManager createDirectoryAtPath:documentPath withIntermediateDirectories:YES attributes:nil error:NULL];
[fileManager copyItemAtPath:tessdataPath toPath:dataPath error:nil];
}
}
Expand Down

0 comments on commit 4f93be0

Please sign in to comment.