adjustment to file search

This commit is contained in:
piotr 2021-05-28 04:18:18 +02:00
parent 6ae39580bb
commit 2a4a00c8f3
2 changed files with 2 additions and 1 deletions

Binary file not shown.

View File

@ -275,7 +275,8 @@ func walk(path string, d fs.DirEntry, e error) error {
}
//if !d.IsDir() {
parts := strings.Split(path, "/")
fileName := parts[len(parts)-1]
//fileName := parts[len(parts)-1]
fileName := strings.Join(parts[4:], "/")
if strings.Contains(strings.ToLower(fileName), strings.ToLower(phrase)) {
fileSearchResults = append(fileSearchResults, path)
}