component: Automatically determine names

This commit is contained in:
Tom Wiesing 2022-10-17 20:39:53 +02:00
parent 10df1c3243
commit e320bb37bb
No known key found for this signature in database
31 changed files with 84 additions and 113 deletions

View file

@ -18,7 +18,7 @@ func (exporter *Exporter) PruneExports(io stream.IOStream) error {
sPath := exporter.ArchivePath()
// list all the files
entries, err := exporter.Core.Environment.ReadDir(sPath)
entries, err := exporter.Still.Environment.ReadDir(sPath)
if err != nil {
return err
}
@ -44,7 +44,7 @@ func (exporter *Exporter) PruneExports(io stream.IOStream) error {
path := filepath.Join(sPath, entry.Name())
io.Printf("Removing %s cause it is older than %d days", path, exporter.Config.MaxBackupAge)
if err := exporter.Core.Environment.Remove(path); err != nil {
if err := exporter.Still.Environment.Remove(path); err != nil {
return err
}
}