Created attachment 108745 [details] fix I've been noticing an issue that appears to express itself more easily with directories called "devel" than others (but that ought to be just an artefact): For a tree structure loaded in a KDevelop project, do > touch /path/to/project/a/b/files/devel/aaa An item `a/b/files/devel/aaa` will show up in the project tree Now do > rm /path/to/project/a/b/files/devel/aaa The item will disappear but only if it isn't the last item in the directory. This glitch is fixed when I remove 3 old (7y) lines from AFMPP::addJobItems(); see the attached patch. Seems rather self-evident: that function should not return without having removed stale/obsolete entries from the directory if no other function takes care of that housekeeping.
I didn't look at the context, but what you say makes sense given the described bug. If you checked that nothing in the function relies on the list not being empty, please submit. Thanks! Also, patches are easier to review on phabricator ;)
Yeah, I know, but this is a bug and I didn't want to pretend I was 100% certain of my fix. Anyway, the list is only used in a foreach loop, so removing the check should be safe.
Git commit 54ab8b8c6717dec9087aa8482b735571a170e5e3 by R.J.V. Bertin. Committed on 08/11/2017 at 16:31. Pushed by rjvbb into branch '5.2'. don't skip empty directories AbstractFileManagerPluginPrivate::addJobItems() returned immediately when called with an empty entries list, thus failing to do required houskeeping. As a result the project manager would continue to show the last file deleted from now empty directories. M +0 -4 kdevplatform/project/abstractfilemanagerplugin.cpp https://commits.kde.org/kdevelop/54ab8b8c6717dec9087aa8482b735571a170e5e3