Bug 458925

Summary: Defaulting baloo settings produces unexpected results
Product: [Applications] systemsettings Reporter: Nicolas Fella <nicolas.fella>
Component: kcm_balooAssignee: baloo-bugs-null
Status: CONFIRMED ---    
Severity: normal CC: heri+kde, nate, plasma-bugs-null, popov895, tagwerk19
Priority: NOR    
Version First Reported In: master   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: Screenshot before defaulting
Screenshot after defaulting
Search settings

Description Nicolas Fella 2022-09-09 13:11:00 UTC
My folder specific configuration has three entries

- /home/nico (Indexed)
- ~/kde (Not indexed)
- ~/workspace (Not indexed)

When clicking "Defaults" the list doesn't change, except that the icons change from a folder to a disk and the remove button is disabled. See screenshots

SOFTWARE/OS VERSIONS
KDE Plasma Version: master
KDE Frameworks Version: master
Qt Version: 5.15.5-kde

ADDITIONAL INFORMATION

Content of .config/baloofilerc:

[General]
dbVersion=2
exclude filters=*~,*.part,*.o,*.la,*.lo,*.loT,*.moc,moc_*.cpp,qrc_*.cpp,ui_*.h,cmake_install.cmake,CMakeCache.txt,CTestTestfile.cmake,libtool,config.status,confdefs.h,autom4te,conftest,confstat,Makefile.am,*.gcode,.ninja_deps,.ninja_log,build.ninja,*.csproj,*.m4,*.rej,*.gmo,*.pc,*.omf,*.aux,*.tmp,*.po,*.vm*,*.nvram,*.rcore,*.swp,*.swap,lzo,litmain.sh,*.orig,.histfile.*,.xsession-errors*,*.map,*.so,*.a,*.db,*.qrc,*.ini,*.init,*.img,*.vdi,*.vbox*,vbox.log,*.qcow2,*.vmdk,*.vhd,*.vhdx,*.sql,*.sql.gz,*.ytdl,*.class,*.pyc,*.pyo,*.elc,*.qmlc,*.jsc,*.fastq,*.fq,*.gb,*.fasta,*.fna,*.gbff,*.faa,po,CVS,.svn,.git,_darcs,.bzr,.hg,CMakeFiles,CMakeTmp,CMakeTmpQmake,.moc,.obj,.pch,.uic,.npm,.yarn,.yarn-cache,__pycache__,node_modules,node_packages,nbproject,core-dumps,lost+found
exclude filters version=8
exclude folders[$e]=$HOME/kde/,$HOME/workspace/
Comment 1 Nicolas Fella 2022-09-09 13:11:56 UTC
Created attachment 151949 [details]
Screenshot before defaulting
Comment 2 Nicolas Fella 2022-09-09 13:12:25 UTC
Created attachment 151950 [details]
Screenshot after defaulting
Comment 3 Nate Graham 2022-09-09 20:42:59 UTC
Odd indeed. I can reproduce.
Comment 4 Nicolas Fella 2022-09-11 00:22:26 UTC
The problem is with https://invent.kde.org/plasma/plasma-desktop/-/blob/master/kcms/baloo/filteredfoldermodel.cpp#L92

We are defaulting the config -> rebuilding the list -> adding the values of m_runtimeConfig.excludeFolders() right back
Comment 5 popov895 2022-10-18 12:58:17 UTC
Created attachment 152991 [details]
Search settings

I'm not sure if I should file a new bug report on this as it seems my issue is related to this one.

Now about my issue. In Fedora KDE spin, by default baloo excludes entire home folder from indexing and includes only document-centric folders (Documents, Images, Music and Videos). If I need to index the entire home folder, I can add it to the list of folders to be indexed, but then my search settings look odd (it's not clear whether the home folder is indexed or not, see attached image) and I also get the following error:

> kf.baloo: Failed to add exclude folder config entry for "/home/epopov/"