Fix search for folders with special characters in their name #581 #587

This will remove the ability to search for multiple folders.
This commit is contained in:
Michael Mayer 2020-11-21 18:32:04 +01:00
parent d637637be6
commit 8516c749b7

View file

@ -231,8 +231,6 @@ func PhotoSearch(f form.PhotoSearch) (results PhotoResults, count int, err error
if strings.HasSuffix(p, "/") {
s = s.Where("photos.photo_path = ?", p[:len(p)-1])
} else if strings.Contains(p, ",") {
s = s.Where("photos.photo_path IN (?)", strings.Split(p, ","))
} else {
s = s.Where("photos.photo_path LIKE ?", strings.ReplaceAll(p, "*", "%"))
}