Allow configured index locations on removable devices
Tracker Miner FS has code to detect if index location is a removable device mountpoint, and ignore it here.
If a location is configured for indexing beneath the toplevel mountpoint, the miner-fs will not detect that and will index it anyway.
If index-removable-devices
setting is set to false, indexed data will be partially deleted on startup in miner_files_in_removable_media_remove_by_type(). This can lead to #184.
A "removable volume" can be many things, here are examples:
- a USB removable storage device connected once to copy data to internal HDD
- a USB harddrive that is connected to a laptop regularly and stores a big content collection
- an SD card in a singleboard computer like Raspberry Pi that holds the whole OS
Tracker Miner FS current behaviour is designed for (1) and works badly for (2) and (3).
Proposal to fix this:
- Allow configuring index locations that are on removable storage.
- In miner_files_in_removable_media_remove_by_type() and miner_files_in_removable_media_remove_by_date(), avoid running the cleanup if a removable device contains any configured index locations.
We should also make miner_files_in_removable_media_remove_by_type() remove data properly, including nfo:FileDataObject resource.