mirror of
https://github.com/ProtonMail/proton-bridge.git
synced 2025-12-10 12:46:46 +00:00
Other: Clean locations on teardown
This commit is contained in:
@ -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)
|
||||
}
|
||||
|
||||
@ -232,5 +232,6 @@ func (l *Locations) Clean() error {
|
||||
l.GetGuiLockFile(),
|
||||
l.getLogsPath(),
|
||||
l.getUpdatesPath(),
|
||||
l.getGluonPath(),
|
||||
).Do()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user