From 2a979398070ce30570303c40b33e105bfe19d514 Mon Sep 17 00:00:00 2001 From: James Houlahan Date: Thu, 13 Oct 2022 03:57:30 +0200 Subject: [PATCH] Other: Clean locations on teardown --- internal/app/app.go | 1 + internal/locations/locations.go | 1 + 2 files changed, 2 insertions(+) diff --git a/internal/app/app.go b/internal/app/app.go index 55d7346d..50c62df4 100644 --- a/internal/app/app.go +++ b/internal/app/app.go @@ -219,6 +219,7 @@ func withLocations(fn func(*locations.Locations) error) error { // Create a new locations object that will be used to provide paths to store files. locations := locations.New(provider, constants.ConfigName) + defer locations.Clean() return fn(locations) } diff --git a/internal/locations/locations.go b/internal/locations/locations.go index dcc9a5c4..f71bbe56 100644 --- a/internal/locations/locations.go +++ b/internal/locations/locations.go @@ -232,5 +232,6 @@ func (l *Locations) Clean() error { l.GetGuiLockFile(), l.getLogsPath(), l.getUpdatesPath(), + l.getGluonPath(), ).Do() }