The file extension handling code in
auto extPos = path.rfind(".traineddata"); if (extPos != std::string::npos) { langs->push_back(path.substr(0, extPos)); }only checks that the file name has a ".taineddata" substring rather than strictly ends with it. As the result, the GetAvailableLanguagesAsVector() method can treat unrelated files (in my case,
*.traineddata.sha256
) as languages.
Expected BehaviorNo response
Suggested FixUse std::filesystem::path::extension()
.
5.5.0
Operating SystemNo response
Other Operating SystemNo response
uname -aNo response
CompilerNo response
CPUNo response
Virtualization / ContainersNo response
Other InformationNo response
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4