搜索结果修改为绝对路径

This commit is contained in:
lzh 2025-06-24 16:25:58 +08:00
parent 4f1d9eff64
commit ac01536de2

View File

@ -123,7 +123,7 @@ func (f *FilesProvider) Search(ctx context.Context, req *filesApi.SearchReq) (*f
err := search.Search(fs, req.Path, req.Query, rules.EmptyChecker, func(path string, f os.FileInfo) error { err := search.Search(fs, req.Path, req.Query, rules.EmptyChecker, func(path string, f os.FileInfo) error {
result.Items = append(result.Items, &filesApi.SearchResp_Nested{ result.Items = append(result.Items, &filesApi.SearchResp_Nested{
IsDir: f.IsDir(), IsDir: f.IsDir(),
Path: req.Path + path, Path: req.Path + "/" + path,
Name: f.Name(), Name: f.Name(),
Size: f.Size(), Size: f.Size(),
ModTime: f.ModTime().UnixMilli(), ModTime: f.ModTime().UnixMilli(),