mirror of
https://github.com/tesseract-ocr/tesseract.git
synced 2024-11-24 11:09:06 +08:00
fix issue 702.
git-svn-id: https://tesseract-ocr.googlecode.com/svn/trunk@761 d0cd1f9f-072b-0410-8dd7-cf729c803f20
This commit is contained in:
parent
23f1d16037
commit
d099dba77e
@ -80,6 +80,12 @@ void CCUtil::main_setup( /*main demo program */
|
||||
datadir = getenv("TESSDATA_PREFIX");
|
||||
}
|
||||
|
||||
// check for missing directory separator
|
||||
const char *lastchar = datadir.string();
|
||||
lastchar += datadir.length() - 1;
|
||||
if ((strcmp(lastchar, "/") != 0) && (strcmp(lastchar, "\\") != 0))
|
||||
datadir += "/";
|
||||
|
||||
datadir += m_data_sub_dir; /*data directory */
|
||||
}
|
||||
} // namespace tesseract
|
||||
|
Loading…
Reference in New Issue
Block a user