Skip to content

Fix issue where newly inserted items end up in the wrong directory

David Edmundson requested to merge work/dir_fix into master

If we have directory "a" and "a/b" and expand both, then collapse "a" we tell KDirWatcher to stop watching both these directories.

However, KDirWatcher keeps them in the listersCurrentlyHolding list even though it's removed from the listersCurrentlyListing list and will still notify of changes. If a new file appears in "a/b/" we will still get change notifications.

When dolphin processes these changes we cannot find the relevant parent node. It then gets confused and inserts the item into the root directory from the POV of the model notifications. When we then open the relevant folder the model knows a node with that URL exists and fails to add it correctly.

This can also be reproduced by continually downloading files into a subdirectory tree and rapidly expanding and collapsing folders a few levels deep.

Edited by David Edmundson

Merge request reports

Loading