Skip to content

Commit

Permalink
fix(url_tree): incorrect tree structure
Browse files Browse the repository at this point in the history
  • Loading branch information
xhofe committed Mar 24, 2023
1 parent 663814c commit 48dc355
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/url_tree/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ func BuildTree(text string, headSize bool) (*Node, error) {
}
// if level isn't greater than the level of the top of the stack
// it is not the child of the top of the stack
if level <= stack[len(stack)-1].Level {
for level <= stack[len(stack)-1].Level {
// pop the top of the stack
stack = stack[:len(stack)-1]
}
Expand Down

2 comments on commit 48dc355

@anwen-anyi
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

之前if的解决了,可以实现不同层级显示了,顺便也试了一下相同的文件夹内容会不会合并
显然并没有合并一起,但是也没显示,写在下面的不会显示,只显示了11.jpg,但是其余的可以通过在浏览器地址栏输入访问

还有就是同名文件会合并,和 alias的调取方法一样也是只调用写的靠前的哪个

这个问题应该不用解决了 到时候高亮提醒一下不要写两个同样的文件夹就好~QAQ

folder22:
  11.jpg:http://pic.rmb.bdstatic.com/bjh/e919290bf3b8396817d369cedf33b8cd.jpeg
folder22:
  22.jpg:http://pic.rmb.bdstatic.com/bjh/aff9c9c8817d943d6857a73188958d45.jpeg
folder22:
  33.jpg:http://pic.rmb.bdstatic.com/bjh/a66923e9bfefd03c2998ee998d3b55e7.jpeg

@xhofe
Copy link
Collaborator Author

@xhofe xhofe commented on 48dc355 Mar 25, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

之前if的解决了,可以实现不同层级显示了,顺便也试了一下相同的文件夹内容会不会合并 显然并没有合并一起,但是也没显示,写在下面的不会显示,只显示了11.jpg,但是其余的可以通过在浏览器地址栏输入访问

还有就是同名文件会合并,和 alias的调取方法一样也是只调用写的靠前的哪个

这个问题应该不用解决了 到时候高亮提醒一下不要写两个同样的文件夹就好~QAQ

folder22:
  11.jpg:http://pic.rmb.bdstatic.com/bjh/e919290bf3b8396817d369cedf33b8cd.jpeg
folder22:
  22.jpg:http://pic.rmb.bdstatic.com/bjh/aff9c9c8817d943d6857a73188958d45.jpeg
folder22:
  33.jpg:http://pic.rmb.bdstatic.com/bjh/a66923e9bfefd03c2998ee998d3b55e7.jpeg

这本来就是自己写的结构,要放在同一个文件夹里自己写在一起就行了。没必要做文件夹合并,就像在文件资源管理器中你无法新建一个同名文件夹。

Please sign in to comment.