aboutsummaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
authorKoni Marti <koni.marti@gmail.com>2023-11-24 22:38:57 +0100
committerRobin Jarry <robin@jarry.cc>2023-11-24 22:45:03 +0100
commit0be135a38186725e6414cb7c6945f93ae6e71ef9 (patch)
tree39d99c8d19bcdc8905cfa67e2e1bb2e0db70178f /app
parentc76121437852abd312327925a50c1f7fe977afce (diff)
downloadaerc-0be135a38186725e6414cb7c6945f93ae6e71ef9.tar.gz
dirtree: fix jumping folders
Fix jumping folders in the directory structure. Fixes: a35d9bab ("rmdir: ensure proper sequence of operations") Reported-by: inwit <inwit@sindominio.net> Reported-by: Bence Ferdinandy <bence@ferdinandy.com> Signed-off-by: Koni Marti <koni.marti@gmail.com> Tested-by: Bence Ferdinandy <bence@ferdinandy.com> Acked-by: Robin Jarry <robin@jarry.cc>
Diffstat (limited to 'app')
-rw-r--r--app/dirtree.go8
1 files changed, 5 insertions, 3 deletions
diff --git a/app/dirtree.go b/app/dirtree.go
index 1e0e76fb..1cfd1513 100644
--- a/app/dirtree.go
+++ b/app/dirtree.go
@@ -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)
}