mirror of
https://github.com/stashapp/stash.git
synced 2025-12-29 03:37:02 +01:00
Fix panic when deleting image with no files (#5328)
This commit is contained in:
parent
76a5b2a06a
commit
c6c3754f02
1 changed files with 4 additions and 1 deletions
|
|
@ -528,7 +528,10 @@ func (qb *ImageStore) GetFiles(ctx context.Context, id int) ([]models.File, erro
|
|||
return nil, err
|
||||
}
|
||||
|
||||
return files, nil
|
||||
ret := make([]models.File, len(files))
|
||||
copy(ret, files)
|
||||
|
||||
return ret, nil
|
||||
}
|
||||
|
||||
func (qb *ImageStore) GetManyFileIDs(ctx context.Context, ids []int) ([][]models.FileID, error) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue