Fix path filters (#3041)

* Fix path filters
* Replace getPathSearchClause
* Remove incorrect tests
This commit is contained in:
DingDongSoLong4
2022-10-26 09:48:13 +02:00
committed by GitHub
parent a60afc162f
commit 1c0042c4c2
7 changed files with 31 additions and 108 deletions

View File

@@ -796,7 +796,8 @@ func (qb *FileStore) Query(ctx context.Context, options models.FileQueryOptions)
distinctIDs(&query, fileTable)
if q := findFilter.Q; q != nil && *q != "" {
searchColumns := []string{"folders.path", "files.basename"}
filepathColumn := "folders.path || '" + string(filepath.Separator) + "' || files.basename"
searchColumns := []string{filepathColumn}
query.parseQueryString(searchColumns, *q)
}