1
0

GODT-1813: Cleanup old go-imap cache files

This commit is contained in:
Leander Beernaert
2022-10-19 14:07:45 +02:00
committed by James Houlahan
parent e0ff30e9a8
commit d47b5b99c5
3 changed files with 42 additions and 0 deletions

View File

@ -193,6 +193,10 @@ func (l *Locations) getLogsPath() string {
return filepath.Join(l.userCache, "logs")
}
func (l *Locations) getGoIMAPCachePath() string {
return filepath.Join(l.userConfig, "cache")
}
func (l *Locations) getUpdatesPath() string {
// In order to properly update Bridge 1.6.X and higher we need to
// change the launcher first. Since this is not part of automatic
@ -235,3 +239,8 @@ func (l *Locations) Clean() error {
l.getGluonPath(),
).Do()
}
// CleanGoIMAPCache removes all cache data from the go-imap implementation.
func (l *Locations) CleanGoIMAPCache() error {
return files.Remove(l.getGoIMAPCachePath()).Do()
}