diff options
author | Nick White <git@njw.name> | 2021-10-12 12:04:36 +0100 |
---|---|---|
committer | Nick White <git@njw.name> | 2021-10-12 12:04:36 +0100 |
commit | ebf623c447d4fe73801242262d4b584920235920 (patch) | |
tree | c9d29fc43ce96d01a53b1eb0d5599952747dcb5f /cmd/rescribe/main.go | |
parent | ff63756c71bf0d10484977bf6d08317c4782ec5e (diff) |
rescribe: fix lookup of external training filev0.5.3
Diffstat (limited to 'cmd/rescribe/main.go')
-rw-r--r-- | cmd/rescribe/main.go | 2 |
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) } |