chore: search by type with empty file name (#1228)

This commit is contained in:
WeidiDeng authored and GitHub committed 2021-01-12 18:08:23 +01:00
1 parent c8257e848e
commit b6263eb607
2 files changed
+5 -1

No files matched your search

+4
View File
@@ -65,6 +65,10 @@ func Search(fs afero.Fs, scope, query string, checker rules.Checker, found func(
return found(originalPath, f)
}
}
} else {
originalPath = strings.TrimPrefix(originalPath, scope)
originalPath = strings.TrimPrefix(originalPath, "/")
return found(originalPath, f)
}
return nil