Skip to content

Commit a979494

Browse files
jbreidenzdenop
authored andcommitted
fix #665 process file list
1 parent 170573f commit a979494

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

api/baseapi.cpp

+9-1
Original file line numberDiff line numberDiff line change
@@ -1085,7 +1085,15 @@ bool TessBaseAPI::ProcessPagesInternal(const char* filename,
10851085

10861086
// Maybe we have a filelist
10871087
if (r != 0 || format == IFF_UNKNOWN) {
1088-
STRING s(buf.c_str());
1088+
STRING s;
1089+
if (stdInput) {
1090+
s = buf.c_str();
1091+
} else {
1092+
std::ifstream t(filename);
1093+
std::string u((std::istreambuf_iterator<char>(t)),
1094+
std::istreambuf_iterator<char>());
1095+
s = u.c_str();
1096+
}
10891097
return ProcessPagesFileList(NULL, &s, retry_config,
10901098
timeout_millisec, renderer,
10911099
tesseract_->tessedit_page_number);

0 commit comments

Comments
 (0)