From ebf623c447d4fe73801242262d4b584920235920 Mon Sep 17 00:00:00 2001 From: Nick White Date: Tue, 12 Oct 2021 12:04:36 +0100 Subject: rescribe: fix lookup of external training file --- cmd/rescribe/main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'cmd/rescribe') 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) } -- cgit v1.2.1-24-ge1ad