mirror of
https://github.com/stashapp/stash.git
synced 2025-12-18 04:44:37 +03:00
Delete funscripts while deleting scene (#2265)
* Delete funscripts while deleting scene * Indicate that funscripts will be deleted Co-authored-by: WithoutPants <53250216+WithoutPants@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
0e514183a7
commit
10bb9a6abc
@@ -135,6 +135,14 @@ func Destroy(scene *models.Scene, repo models.Repository, fileDeleter *FileDelet
|
||||
if err := fileDeleter.Files([]string{scene.Path}); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
funscriptPath := utils.GetFunscriptPath(scene.Path)
|
||||
funscriptExists, _ := utils.FileExists(funscriptPath)
|
||||
if funscriptExists {
|
||||
if err := fileDeleter.Files([]string{funscriptPath}); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if deleteGenerated {
|
||||
|
||||
Reference in New Issue
Block a user