You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by ja...@almery.com on 2000/04/04 09:11:29 UTC

Re: ANT tag

jon * writes:
 > on 4/2/00 10:27 PM, ja@almery.com <ja...@almery.com> wrote:
 > 
 > > I can't convince cvs to allow me to log in (anonymously) to get the
 > > latest source, but at one time this also happened to me.  I submitted
 > > a patch, which tested to see if the "directory" was a symlink, and
 > > ignored it if it was.  The patch was committed by someone, and all
 > > seemed well.
 > 
 > submit the patch again...i will get it checked in.
 > 
 > really this conversation should be going on the ant-dev mailing list.

I looked at the source via cvsweb (I wonder why my logins time out
with "regular" anonymous cvs?) and noticed that costin commented out
the "fix"

        //        if (dir.getCanonicalPath().equals(dir.getAbsolutePath())) {
        // (costin) It will not work if /home/costin is symlink to /da0/home/costin ( taz
        // for example )

So, it looks as though the dangerous behaviour of Deltree has
returned.

-- 
Jay Doane | doane@acm.org

Re: ANT tag

Posted by William Uther <wi...@cs.cmu.edu>.
Hi,
  This 'fix' doesn't work on some systems.  I'm not sure which system 
caused problems for Costin, but it fails on a Mac.

  File.getCanonicalPath() is system dependant.  In particular, on a Mac, 
the filename returned ends in a '/'.  This is different to the behaviour of 
File.getAbsolutePath().  Hence, these will never be equal on a mac.  You 
can fix this by normalizing for the existance of a '/' at the end of the 
paths.

  Also, the simple existance test shown below tests if there is a symlink 
anywhere in the path, NOT if the path target is a symlink.  I believe there 
was other code elsewhere that got the canonical path when you started to 
remove all other symlinks but, based on Costin's report, this didn't work 
all the time.

later,

\x/ill            :-}

--On Tuesday, April 4, 2000 12:11 AM -0700 ja@almery.com wrote:

> jon * writes:
>  > on 4/2/00 10:27 PM, ja@almery.com <ja...@almery.com> wrote:
>  >
>  > > I can't convince cvs to allow me to log in (anonymously) to get the
>  > > latest source, but at one time this also happened to me.  I submitted
>  > > a patch, which tested to see if the "directory" was a symlink, and
>  > > ignored it if it was.  The patch was committed by someone, and all
>  > > seemed well.
>  >
>  > submit the patch again...i will get it checked in.
>  >
>  > really this conversation should be going on the ant-dev mailing list.
>
> I looked at the source via cvsweb (I wonder why my logins time out
> with "regular" anonymous cvs?) and noticed that costin commented out
> the "fix"
>
>         //        if
>         (dir.getCanonicalPath().equals(dir.getAbsolutePath())) { //
>         (costin) It will not work if /home/costin is symlink to
>         /da0/home/costin ( taz // for example )
>
> So, it looks as though the dangerous behaviour of Deltree has
> returned.
>
> --
> Jay Doane | doane@acm.org