Re: [Tracker] trackerd looses its time with symlinks
- From: Nathan Holstein <ngh isomerica net>
- To: Tracker List <tracker-list gnome org>
- Subject: Re: [Tracker] trackerd looses its time with symlinks
- Date: Mon, 09 Oct 2006 21:54:58 -0400
On Tue, 2006-10-10 at 03:01 +0200, Laurent Aguerreche wrote:
trackerd is currently following symlinks to find new contents. Now,
imagine a symlink in a directory that points to $HOME. It seems that
trackerd follows this link and try to re-index all the files in $HOME. I
see things like:
I noticed this problem too. I was indexing $HOME, and this included
source from a school CS project. One of the tests for the project was a
recursive symlink loop, and trackerd treated each level as a new
directory.
Eventually, if nothing else happens, the path name reaches the maximum
path length and the OS will no longer follow the link. I know of at
least three ways to fix this; each requires knowing that the file is a
symlink. The first is to not follow symlinks. This seems far from
ideal.
The next is to follow the symlink, and check if the path of the link
target has already been indexed.
The final way is to store the device ID and inode of each file and
directory and only index a file if it has a distinct device ID/inode
pair. Since posix guarantees they're unique, this prevents any
recursion. This also has the benefit of working for hard links as well.
nathan h
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]