Skip to content

Commit

Permalink
fix name resolution (adapting ui)
Browse files Browse the repository at this point in the history
  • Loading branch information
vintikzzz committed Dec 3, 2024
1 parent a42e58a commit f216ea6
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions handlers/resource/get.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit f216ea6

Please sign in to comment.