Added scene and image file deletion logging (#4004)

This commit is contained in:
Flashy78
2023-08-07 16:34:05 -07:00
committed by GitHub
parent d0c60bab50
commit 8ac3353103
2 changed files with 4 additions and 0 deletions

View File

@@ -5,6 +5,7 @@ import (
"github.com/stashapp/stash/pkg/file"
"github.com/stashapp/stash/pkg/fsutil"
"github.com/stashapp/stash/pkg/logger"
"github.com/stashapp/stash/pkg/models"
"github.com/stashapp/stash/pkg/models/paths"
)
@@ -106,6 +107,7 @@ func (s *Service) deleteFiles(ctx context.Context, i *models.Image, fileDeleter
// don't delete files in zip archives
const deleteFile = true
if f.Base().ZipFileID == nil {
logger.Info("Deleting image file: ", f.Base().Path)
if err := file.Destroy(ctx, s.File, f, fileDeleter.Deleter, deleteFile); err != nil {
return err
}