fix(ftp-server): work unproperly when base url is not root (#7693)

* fix(ftp-server): work unproperly when base url is not root

* fix: avoid merge conflict
This commit is contained in:
KirCute_ECT
2024-12-25 21:11:36 +08:00
committed by GitHub
parent bb2aec20e4
commit 6aaf5975c6
3 changed files with 11 additions and 13 deletions

View File

@ -25,12 +25,8 @@ type FileDownloadProxy struct {
closers *utils.Closers
}
func OpenDownload(ctx context.Context, path string) (*FileDownloadProxy, error) {
func OpenDownload(ctx context.Context, reqPath string) (*FileDownloadProxy, error) {
user := ctx.Value("user").(*model.User)
reqPath, err := user.JoinPath(path)
if err != nil {
return nil, err
}
meta, err := op.GetNearestMeta(reqPath)
if err != nil {
if !errors.Is(errors.Cause(err), errs.MetaNotFound) {