pkg/environment: Remove some file-based functions

This commit removes certain file-based functions from 'pkg/environment',
continuing the migration to entirely remove the package.
This commit is contained in:
Tom Wiesing 2023-03-02 11:15:15 +01:00
parent 39207a1cb5
commit 45540ab253
No known key found for this signature in database
20 changed files with 52 additions and 120 deletions

View file

@ -2,6 +2,7 @@ package logger
import (
"context"
"os"
"github.com/FAU-CDI/wisski-distillery/internal/dis/component"
"github.com/FAU-CDI/wisski-distillery/internal/dis/component/sql"
@ -62,7 +63,7 @@ func (log *Logger) Log(ctx context.Context) ([]models.Export, error) {
// partition out the exports that have been deleted!
parts := collection.Partition(exports, func(s models.Export) bool {
_, err := log.Still.Environment.Stat(s.Path)
_, err := os.Stat(s.Path)
return !environment.IsNotExist(err)
})