It is not possible to clear deleted files from the db, baloo returns the error: "Could not stat file" This is because of line 243 in main.cpp, where non-existing files are skipped. We should be happy that we found a wrong record referring to a non-existing file in our db of files, and remove the wrong file record instead. https://github.com/KDE/baloo/compare/master...vitamins:patch-1 I haven't compiled this, but it's only deleting 4 lines, so i'm positive.
Hmm it's not that simple, since the next check also fails if id is 0, and we seem to need the id to remove the record, but it is 0 for non-existing files. tr.removeDocument(id) Can we remove using only the url instead?
Clearing an existing file which is in an indexed path is also problematic, since it will get added back later on automatically, reverting the clear action.
Still happening in version 5.30.
Still happening in version 5.31.0-1. Can someone at least confirm this bug?
Definitely confirmed, though I'm marking this as a duplicate of an older bug where the same thing was reported. Lukas, can you add your findings to https://bugs.kde.org/show_bug.cgi?id=353874? If you're still interested in poking at this code, I encourage you to submit a patch to https://phabricator.kde.org/! *** This bug has been marked as a duplicate of bug 353874 ***