From 811075e32aa81df11f4d54fe0f5f315f4422d43c Mon Sep 17 00:00:00 2001 From: Nick White Date: Mon, 20 Dec 2021 15:04:21 +0000 Subject: rescribe: Ensure temporary tesseract dir is removed in gui mode too --- cmd/rescribe/main.go | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'cmd/rescribe') diff --git a/cmd/rescribe/main.go b/cmd/rescribe/main.go index 8224830..229bf49 100644 --- a/cmd/rescribe/main.go +++ b/cmd/rescribe/main.go @@ -238,6 +238,11 @@ These training files are included in rescribe, and are always available: if flag.NArg() < 1 || *usegui { err := startGui(*verboselog, tessCommand, trainingName, *systess, tessdir) + err = os.RemoveAll(tessdir) + if err != nil { + log.Printf("Error removing tesseract directory %s: %v", tessdir, err) + } + if err != nil { log.Fatalln("Error in gui:", err) } -- cgit v1.2.1-24-ge1ad