Permalink
Browse files

Create missing documents directory when required.

  • Loading branch information...
hiltonc committed Dec 18, 2012
1 parent 9ee2dbf commit 3da034c563f73052a122ab7b46ce8055c925ab32
Showing with 1 addition and 0 deletions.
  1. +1 −0 Classes/Tesseract.mm
View
@@ -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];
}
}

0 comments on commit 3da034c

Please sign in to comment.