nmindex: query auto add _ prefix

This commit is contained in:
xushiwei
2024-05-11 05:43:27 +08:00
parent cd266213ce
commit 29830865d9

View File

@@ -73,6 +73,11 @@ func makeIndex() {
}
func query(q string) {
if len(q) > 0 {
if c := q[0]; c != '*' && c != '_' {
q = "_" + q
}
}
files, err := nm.Query(indexDir(), q)
check(err)
for _, f := range files {