Bug 444350

Summary: Can't to config baloo indexing: balooctl unable to exclude a folder from from included folders list
Product: [Frameworks and Libraries] frameworks-baloo Reporter: pveax <pveax>
Component: balooctlAssignee: baloo-bugs-null
Status: CONFIRMED ---    
Severity: normal CC: tagwerk19
Priority: NOR    
Version: 5.87.0   
Target Milestone: ---   
Platform: Manjaro   
OS: Linux   
See Also: https://bugs.kde.org/show_bug.cgi?id=429910
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description pveax 2021-10-24 21:37:26 UTC
SUMMARY

Baloo can't remove the folder from indexing list of directories. That folder unexpectedly permanently enabled and can not be remover from indexed list of locations.

STEPS TO REPRODUCE
```
$ whoami
m
$ balooctl config list excludeFolders
$ balooctl config list includeFolders
/home/m/
$ balooctl config rm includeFolders /home/m/                                                                                                                           
$ balooctl config list includeFolders
/home/m/
$ balooctl config remove includeFolders /home/m/                                                                                                                           
$ balooctl config list includeFolders
/home/m/
$ balooctl -v
baloo 5.87.0
$
```

OBSERVED RESULT

The `/home/username` folder persists.

EXPECTED RESULT

The `/home/username` folder should be removable and not be permanently hard coded. It should be configurable: to have an ability to be removed by a user.

SOFTWARE/OS VERSIONS
```
Operating System: Manjaro Linux
KDE Plasma Version: 5.23.1
KDE Frameworks Version: 5.87.0
Qt Version: 5.15.2
Kernel Version: 5.15.0-1-MANJARO (64-bit)
Graphics Platform: Wayland
```

ADDITIONAL INFORMATION
Thanks!
Comment 1 tagwerk19 2021-10-25 10:19:52 UTC
Confirming this on Neon Testing

... Also discussed in Bug 429910

There is a workround if you don't want to index you home directory, include an different folder and exclude your home:

    balooctl config add includefolders ~/Documents
    balooctl config rm includefolders $HOME

    balooctl config list includefolders

Maybe flag one of the reports as a duplicate...
Comment 2 pveax 2021-10-25 16:59:09 UTC
tagwerk19, the workaround substitution mentioned by you, works for me,
but if to proceed to act after your code, the $HOME re-appears from nowhere. 
Full code:

```
$ balooctl config add includefolders ~/Documents
$ balooctl config rm includefolders $HOME
$ balooctl config list includeFolders
/home/m/Documents/
$ balooctl config rm includefolders ~/Documents
$ balooctl config list includeFolders
/home/m/
```
Probably some hard-coded substitution of empty list by injecting the $HOME item into it.

Looks like a remnant after some internal tests during developing time.