fix(cloudreve): Manually set path to avoid empty path (#1933)

This commit is contained in:
TwoOnefour
2026-01-08 10:53:09 +08:00
committed by GitHub
parent 744dbd5e26
commit 0d99e16b59
2 changed files with 2 additions and 0 deletions

View File

@@ -73,6 +73,7 @@ func (d *Cloudreve) List(ctx context.Context, dir model.Obj, args model.ListArgs
}
src.Size = dprop.Size
}
src.Path = path.Join(dir.GetPath(), src.Name)
return objectToObj(src, thumb), nil
})
}

View File

@@ -59,6 +59,7 @@ func objectToObj(f Object, t model.Thumbnail) *model.ObjThumb {
Size: int64(f.Size),
Modified: f.Date,
IsFolder: f.Type == "dir",
Path: f.Path,
},
Thumbnail: t,
}