mirror of
https://github.com/stashapp/stash.git
synced 2025-12-17 20:34:37 +03:00
Feature: Add trash support (#6237)
This commit is contained in:
@@ -19,6 +19,7 @@ type FileDeleter struct {
|
||||
}
|
||||
|
||||
// MarkGeneratedFiles marks for deletion the generated files for the provided image.
|
||||
// Generated files bypass trash and are permanently deleted since they can be regenerated.
|
||||
func (d *FileDeleter) MarkGeneratedFiles(image *models.Image) error {
|
||||
var files []string
|
||||
thumbPath := d.Paths.Generated.GetThumbnailPath(image.Checksum, models.DefaultGthumbWidth)
|
||||
@@ -32,7 +33,7 @@ func (d *FileDeleter) MarkGeneratedFiles(image *models.Image) error {
|
||||
files = append(files, prevPath)
|
||||
}
|
||||
|
||||
return d.Files(files)
|
||||
return d.FilesWithoutTrash(files)
|
||||
}
|
||||
|
||||
// Destroy destroys an image, optionally marking the file and generated files for deletion.
|
||||
|
||||
Reference in New Issue
Block a user