nmindex: query auto add _ prefix
This commit is contained in:
@@ -73,6 +73,11 @@ func makeIndex() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func query(q string) {
|
func query(q string) {
|
||||||
|
if len(q) > 0 {
|
||||||
|
if c := q[0]; c != '*' && c != '_' {
|
||||||
|
q = "_" + q
|
||||||
|
}
|
||||||
|
}
|
||||||
files, err := nm.Query(indexDir(), q)
|
files, err := nm.Query(indexDir(), q)
|
||||||
check(err)
|
check(err)
|
||||||
for _, f := range files {
|
for _, f := range files {
|
||||||
|
|||||||
Reference in New Issue
Block a user