ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Bodewig <bode...@apache.org>
Subject Re: DirectoryScanner and Symlinks
Date Fri, 05 Sep 2008 09:22:13 GMT
On Fri, 5 Sep 2008, Gilles Scokart <gscokart@gmail.com> wrote:

> 2008/9/5 Stefan Bodewig <bodewig@apache.org>:
>> On Thu, 4 Sep 2008, Peter Reilly <peter.kitt.reilly@gmail.com> wrote:
>>
>>> Is it not costly (as in very costly) to get the canonical path ?
>>
>> That's what I've been told but I've never measured it.
>>
>> Currently DirectoryScanner avoids looking at the canonical path
>> unless followSymlinks is false.  The problem with infinite loops
>> caused by symlinks only happens if followSymlinks is true - so any
>> solution to the problem will make DirectoryScanner look up
>> canonical paths more often and thus probably make scanning slower.
>>
> 
> Instead of checking the canonical path, we could maybe check to path
> in which we want to recurse.

I don't think I understand what you mean here.

The directory listing of base will show a single child directory A
with no indication that this is a link (the only way to find out is to
get the canonical path).

> The only case where we need to check for symlink is when we are in
> A/base and want to recurse in a directory name A.

How do we know this would be a recursion without checking the
canonical path?

Stefan

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Mime
View raw message