Bug 425360

Summary: List entry for home folder is can be deleted, but always returns upon re-opening the KCM
Product: [Applications] systemsettings Reporter: Yurii Kolesnykov <yurii.kolesnykov>
Component: kcm_balooAssignee: baloo-bugs-null
Status: RESOLVED FIXED    
Severity: normal CC: nate, plasma-bugs, yurii.kolesnykov, zrenfire
Priority: NOR    
Version: 5.19.4   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In: 5.22

Description Yurii Kolesnykov 2020-08-14 23:25:40 UTC
SUMMARY
Home folder override in search section in System Settings are keep returning.

STEPS TO REPRODUCE
1. Open search section in System Settings
2. Remove override for home folder by clicking on red trash icon next to it
3. Switch to other settings section or restart system settings.

OBSERVED RESULT
Home folder override keeps returning

EXPECTED RESULT
Once removed, home folder override should't reset.

SOFTWARE/OS VERSIONS
Operating System: Arch Linux
KDE Plasma Version: 5.19.4
KDE Frameworks Version: 5.73.0
Qt Version: 5.15.0
Kernel Version: 5.8.0-pf2-1-pf-git+
OS Type: 64-bit

ADDITIONAL INFORMATION
Related to https://bugs.kde.org/show_bug.cgi?id=425282
Comment 1 Nate Graham 2020-08-17 16:43:28 UTC
Yeah, we should probably not let the user remove this entry, only change its indexing status.
Comment 2 Bug Janitor Service 2021-04-23 04:13:15 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-desktop/-/merge_requests/439
Comment 3 Chris Holland 2021-04-25 19:25:17 UTC
Possibly related:
https://www.reddit.com/r/ManjaroLinux/comments/my55oc/weird_file_indexing_glitch_in_manjarokde/

The user changed their home directory to "Not Indexed", selected another KCM, then opened up "File Search" again to see:

/home/user "Indexed"
/home/user "Not Indexed"

He repeated it to get

/home/user "Indexed"
/home/user "Not Indexed"
/home/user "Not Indexed"
Comment 4 Nate Graham 2021-04-26 10:39:18 UTC
Git commit 07dcff19b05ed63311fc42665d559f11c7281870 by Nate Graham.
Committed on 26/04/2021 at 10:39.
Pushed by ngraham into branch 'master'.

[kcms/baloo] Don't allow removing the home path

Baloo doesn't actually support not indexing the home path at all, but
the UI allows it, sort of: you can do it, but it doesn't actually have
any effect, and and the removed entry comes back when you leave and
return to the KCM. So let's remove the possibility of doing it at all
by marking the home path in the model as not deletable.
FIXED-IN: 5.22

M  +1    -1    kcms/baloo/filteredfoldermodel.cpp

https://invent.kde.org/plasma/plasma-desktop/commit/07dcff19b05ed63311fc42665d559f11c7281870