summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick White <git@njw.name>2021-12-20 15:04:21 +0000
committerNick White <git@njw.name>2021-12-20 15:04:21 +0000
commit811075e32aa81df11f4d54fe0f5f315f4422d43c (patch)
treee8495fdd67293a20c508d54f5eaa36da7c3decf5
parent7764cb2204f45dff66c97611a84faa41ed4ca206 (diff)
rescribe: Ensure temporary tesseract dir is removed in gui mode too
-rw-r--r--cmd/rescribe/main.go5
1 files changed, 5 insertions, 0 deletions
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)
}