mirror of
https://github.com/stashapp/stash.git
synced 2025-12-17 20:34:37 +03:00
Fix path filters (#3041)
* Fix path filters * Replace getPathSearchClause * Remove incorrect tests
This commit is contained in:
@@ -2097,42 +2097,6 @@ func TestSceneQueryPath(t *testing.T) {
|
||||
[]int{sceneIdx},
|
||||
[]int{otherSceneIdx},
|
||||
},
|
||||
{
|
||||
"equals folder name",
|
||||
models.StringCriterionInput{
|
||||
Value: folder,
|
||||
Modifier: models.CriterionModifierEquals,
|
||||
},
|
||||
[]int{sceneIdx},
|
||||
nil,
|
||||
},
|
||||
{
|
||||
"equals folder name trailing slash",
|
||||
models.StringCriterionInput{
|
||||
Value: folder + string(filepath.Separator),
|
||||
Modifier: models.CriterionModifierEquals,
|
||||
},
|
||||
[]int{sceneIdx},
|
||||
nil,
|
||||
},
|
||||
{
|
||||
"equals base name",
|
||||
models.StringCriterionInput{
|
||||
Value: basename,
|
||||
Modifier: models.CriterionModifierEquals,
|
||||
},
|
||||
[]int{sceneIdx},
|
||||
nil,
|
||||
},
|
||||
{
|
||||
"equals base name leading slash",
|
||||
models.StringCriterionInput{
|
||||
Value: string(filepath.Separator) + basename,
|
||||
Modifier: models.CriterionModifierEquals,
|
||||
},
|
||||
[]int{sceneIdx},
|
||||
nil,
|
||||
},
|
||||
{
|
||||
"equals full path wildcard",
|
||||
models.StringCriterionInput{
|
||||
@@ -2151,24 +2115,6 @@ func TestSceneQueryPath(t *testing.T) {
|
||||
[]int{otherSceneIdx},
|
||||
[]int{sceneIdx},
|
||||
},
|
||||
{
|
||||
"not equals folder name",
|
||||
models.StringCriterionInput{
|
||||
Value: folder,
|
||||
Modifier: models.CriterionModifierNotEquals,
|
||||
},
|
||||
nil,
|
||||
[]int{sceneIdx},
|
||||
},
|
||||
{
|
||||
"not equals basename",
|
||||
models.StringCriterionInput{
|
||||
Value: basename,
|
||||
Modifier: models.CriterionModifierNotEquals,
|
||||
},
|
||||
nil,
|
||||
[]int{sceneIdx},
|
||||
},
|
||||
{
|
||||
"includes folder name",
|
||||
models.StringCriterionInput{
|
||||
|
||||
Reference in New Issue
Block a user