Skip to content

Conversation

stweil
Copy link
Member

@stweil stweil commented Jul 3, 2024

Don't check for a directory, because a symbolic link is also allowed.

@@ -48,6 +49,12 @@ void CCUtil::main_setup(const std::string &argv0, const std::string &basename) {

const char *tessdata_prefix = getenv("TESSDATA_PREFIX");

// Ignore TESSDATA_PREFIX if there is no matching filesystem entry.
if (tessdata_prefix != nullptr && ! std::filesystem::exists(tessdata_prefix)) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If this is not a space typo ! it is easier to use fs as

namespace fs = std::filesystem;
if (!fs::exists(...))

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It was a space typo which is fixed now, thanks for the hint.

…esseract-ocr#4277)

Don't check for a directory, because a symbolic link is also allowed.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
@stweil stweil merged commit bc490ea into tesseract-ocr:main Jul 3, 2024
@stweil stweil deleted the issue4277 branch July 3, 2024 18:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants