From 81d97dd032ad6ea4729a3d8c2a041201ca809d75 Mon Sep 17 00:00:00 2001 From: Alex Yatskov Date: Fri, 1 Jan 2021 17:28:12 -0800 Subject: [PATCH] Fix import of epwing dictionaries that have a lower-case CATALOGS file --- common.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/common.go b/common.go index 3187eed..189bf6b 100644 --- a/common.go +++ b/common.go @@ -302,6 +302,11 @@ func detectFormat(path string) (string, error) { if err == nil { return "epwing", nil } + + _, err = os.Stat(filepath.Join(path, "catalogs")) + if err == nil { + return "epwing", nil + } } return "", errors.New("unrecognized dictionary format")