mirror of
https://github.com/stashapp/stash.git
synced 2025-12-17 20:34:37 +03:00
Exclude media in generated directory (#1118)
This commit is contained in:
@@ -41,7 +41,9 @@ func (t *CleanTask) shouldClean(path string) bool {
|
||||
// use image.FileExists for zip file checking
|
||||
fileExists := image.FileExists(path)
|
||||
|
||||
if !fileExists || getStashFromPath(path) == nil {
|
||||
// #1102 - clean anything in generated path
|
||||
generatedPath := config.GetGeneratedPath()
|
||||
if !fileExists || getStashFromPath(path) == nil || utils.IsPathInDir(generatedPath, path) {
|
||||
logger.Infof("File not found. Cleaning: \"%s\"", path)
|
||||
return true
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user