From f216ea611ae30905ecc76ee6fa343f231b2b402e Mon Sep 17 00:00:00 2001 From: Pavel Tatarskiy Date: Tue, 3 Dec 2024 21:43:37 +0300 Subject: [PATCH] fix name resolution (adapting ui) --- handlers/resource/get.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/handlers/resource/get.go b/handlers/resource/get.go index 9fa5ef2..b28e842 100644 --- a/handlers/resource/get.go +++ b/handlers/resource/get.go @@ -107,6 +107,14 @@ func (s *Handler) get(c *gin.Context) { indexTpl.HTMLWithErr(errors.Wrap(err, "failed to list resource"), http.StatusInternalServerError, c, d) return } + if len(list.Items) == 1 && list.Items[0].Type == ra.ListTypeDirectory { + args.PWD = list.Items[0].PathStr + list, err = s.getList(ctx, args) + if err != nil { + indexTpl.HTMLWithErr(errors.Wrap(err, "failed to list resource"), http.StatusInternalServerError, c, d) + return + } + } if len(list.Items) > 1 { d.List = list }