Currently, when the opened directory gets deleted by some other process, the user is left in a non-existing directory and can't perform any useful actions in this state. I think a better behavior would be to go up the directory hierarchy until we find an existing directory and open it and also notify the user about it. I'd be interested to work on this.
Feel free to work on this. I am not quite sure how easy it is to be notified if the current directory has been deleted by some other process. It might not be as easy as it might seem. (Or it might be easy, I don't really know.)
I also want to mention that if your implementation were to require regular polls or pings to make sure the directory still exists, we probably wouldn't want to merge it, because we tend to avoid performance penalties for things that aren't strictly necessary.
Good luck! :)
Git commit c9efd08118058cd4aaa0c666a9369ce0055eaf79 by Vova Kulik.
Committed on 17/10/2022 at 19:11.
Pushed by meven into branch 'dolphin-removed-dir'.
Clear all the item data before emitting parent dir removed
M +1 -0 src/kitemviews/kfileitemmodel.cpp