Filesystem miner stops following links to directories
Copied from Bugzilla: https://bugzilla.gnome.org/show_bug.cgi?id=792145
Tracker's filesystem miner follows symbolic links to directories, but loses track of their contents after the link is renamed or moved, after a hard reset of the index, or if the link's parent directory gets set as a Search Location after the link was created/moved there. Note that the link itself will still be indexed, but the contents of the directory the link points to will not. The only way to let Tracker re-index files in linked directories is to delete the link and create it again.
Steps to reproduce:
- Create a directory in a non-indexed location, and create some files in it. Ex:
mkdir -p ~/parent/testDir
echo hello > ~/parent/testDir/test1.txt
echo hello2 > ~/parent/testDir/test2.txt
- In a directory that is indexed recursively, create a symbolic link to the non-indexed directory that was just made. Ex:
ln -s /home/$USER/parent/testDir ~/Documents/linkTest
- Wait a few moments to let Tracker index the files, then run
tracker search
ortracker info
to confirm that the files have been indexed. Ex:
tracker search test*
tracker info ~/Documents/linkTest/*
-
Do any one of the following:
-Rename the link.
-Move the link to another recursively-indexed location.
-Hard-reset the Tracker index and restart the indexing daemons.
-In Settings->Search, click the gear at the bottom-right corner of the window, and disable & immediately re-enable the link's parent directory as a Search Location.
Ex:
mv ~/Documents/{linkTest,renamedLink}
--OR--
mv ~/Documents/linkTest ~/Music/
--OR--
tracker reset --hard
tracker daemon --start
--OR--
# In Settings->Search->gear->Places, disable Documents as a Search Location, then re-enable it
Expected results:
After waiting a few moments, the files in the linked directory should still be indexed and may be found with tracker search
.
Actual results:
The files in the linked directory will no longer be indexed, so they will not be found with tracker search
. Running tracker info
on any of the files that should be indexed reveals that Tracker does not manage them at all.