Skip to content

Commit

Permalink
dirtree: fix jumping folders
Browse files Browse the repository at this point in the history
Fix jumping folders in the directory structure.

Fixes: a35d9ba ("rmdir: ensure proper sequence of operations")
Reported-by: inwit <[email protected]>
Reported-by: Bence Ferdinandy <[email protected]>
Signed-off-by: Koni Marti <[email protected]>
Tested-by: Bence Ferdinandy <[email protected]>
Acked-by: Robin Jarry <[email protected]>
  • Loading branch information
konimarti authored and rjarry committed Nov 24, 2023
1 parent c761214 commit 0be135a
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions app/dirtree.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,13 +76,15 @@ func (dt *DirectoryTree) Update(msg types.WorkerMessage) {

case *types.Done:
switch resp := msg.InResponseTo().(type) {
case *types.RemoveDirectory, *types.ListDirectories, *types.CreateDirectory:
case *types.RemoveDirectory, *types.ListDirectories:
dt.DirectoryList.Update(msg)
dt.buildTree()
dt.Invalidate()
case *types.OpenDirectory:
dt.reindex(resp.Directory)
case *types.CreateDirectory:
dt.DirectoryList.Update(msg)
dt.buildTree()
dt.reindex(resp.Directory)
dt.Invalidate()
default:
dt.DirectoryList.Update(msg)
}
Expand Down

0 comments on commit 0be135a

Please sign in to comment.