summaryrefslogtreecommitdiff
path: root/cmd
diff options
context:
space:
mode:
authorNick White <git@njw.name>2021-10-12 12:04:36 +0100
committerNick White <git@njw.name>2021-10-12 12:04:36 +0100
commitebf623c447d4fe73801242262d4b584920235920 (patch)
treec9d29fc43ce96d01a53b1eb0d5599952747dcb5f /cmd
parentff63756c71bf0d10484977bf6d08317c4782ec5e (diff)
rescribe: fix lookup of external training filev0.5.3
Diffstat (limited to 'cmd')
-rw-r--r--cmd/rescribe/main.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/cmd/rescribe/main.go b/cmd/rescribe/main.go
index ff4d582..54338f3 100644
--- a/cmd/rescribe/main.go
+++ b/cmd/rescribe/main.go
@@ -214,7 +214,7 @@ These training files are included in rescribe, and are always available:
// if trainingPath doesn't exist, set it to the embedded training instead
_, err = os.Stat(trainingPath)
- if !os.IsExist(err) {
+ if err != nil && !os.IsExist(err) {
trainingPath = filepath.Base(trainingPath)
trainingPath = filepath.Join(tessdatadir, trainingPath)
}