Skip to content

Commit

Permalink
dirtree: fix dirlist-collapse=0 regression
Browse files Browse the repository at this point in the history
Ensure not to collapse any folder when dirlist-collapse=0.

Fixes: 73dc39c ("treewide: replace uint32 uids with opaque strings")
Reported-by: Tim Culverhouse <tim@timculverhouse.com>
Signed-off-by: Robin Jarry <robin@jarry.cc>
Tested-by: Tim Culverhouse <tim@timculverhouse.com>
  • Loading branch information
rjarry committed Sep 20, 2024
1 parent 49afb05 commit 7f69618
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app/dirtree.go
Original file line number Diff line number Diff line change
Expand Up @@ -477,7 +477,8 @@ func (dt *DirectoryTree) buildTreeNode(node *types.Thread, dirs []string, depth
sort.Strings(bases)

basePath := dt.getDirectory(node)
if depth > dt.UiConfig(basePath).DirListCollapse {
collapse := dt.UiConfig(basePath).DirListCollapse
if collapse != 0 && depth > collapse {
node.Hidden = 1
} else {
node.Hidden = 0
Expand Down

0 comments on commit 7f69618

Please sign in to comment.