mirror of
https://github.com/freedomofpress/dangerzone.git
synced 2025-04-28 18:02:38 +02:00
Use TESSDATA_PREFIX if explicitly passed
Our logic for detecting the appropriate Tesseract data directory should also take into account the canonical envvar, if explicitly passed.
This commit is contained in:
parent
277b1675ca
commit
cf9a545c1a
1 changed files with 3 additions and 1 deletions
|
@ -14,7 +14,9 @@ def running_on_qubes() -> bool:
|
|||
|
||||
|
||||
def get_tessdata_dir() -> str:
|
||||
if running_on_qubes():
|
||||
if os.environ.get("TESSDATA_PREFIX"):
|
||||
return os.environ["TESSDATA_PREFIX"]
|
||||
elif running_on_qubes():
|
||||
return "/usr/share/tesseract/tessdata/"
|
||||
else:
|
||||
return "/usr/share/tessdata/"
|
||||
|
|
Loading…
Reference in a new issue