fix issue 702.

git-svn-id: https://tesseract-ocr.googlecode.com/svn/trunk@761 d0cd1f9f-072b-0410-8dd7-cf729c803f20
This commit is contained in:
zdenop@gmail.com 2012-09-24 05:26:12 +00:00
parent 23f1d16037
commit d099dba77e

View File

@ -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