Return-Path: Delivered-To: apmail-jakarta-ant-dev-archive@apache.org Received: (qmail 82218 invoked from network); 10 Nov 2002 16:54:20 -0000 Received: from unknown (HELO nagoya.betaversion.org) (192.18.49.131) by daedalus.apache.org with SMTP; 10 Nov 2002 16:54:20 -0000 Received: (qmail 3218 invoked by uid 97); 10 Nov 2002 16:55:16 -0000 Delivered-To: qmlist-jakarta-archive-ant-dev@jakarta.apache.org Received: (qmail 3201 invoked by uid 97); 10 Nov 2002 16:55:15 -0000 Mailing-List: contact ant-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Ant Developers List" Reply-To: "Ant Developers List" Delivered-To: mailing list ant-dev@jakarta.apache.org Received: (qmail 3189 invoked by uid 98); 10 Nov 2002 16:55:15 -0000 X-Antivirus: nagoya (v4218 created Aug 14 2002) From: "Bill Chmura" To: "'Ant Developers List'" Subject: RE: Need some advice -> with ANT FTP and symlinked files Date: Sun, 10 Nov 2002 11:54:00 -0500 Message-ID: <000f01c288d9$c689b6f0$6400a8c0@s2701> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook, Build 10.0.2627 In-reply-to: <000e01c288d9$925526d0$6400a8c0@s2701> Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N Sorry, as soon as it posted I realized what a dumb subject line that was.. -----Original Message----- From: Bill Chmura [mailto:Bill@explosivo.com] Sent: Sunday, November 10, 2002 11:53 AM To: ant-dev@jakarta.apache.org Subject: Need some advice Hello, I am working on a patch to fix bug 14063, a problem with ANT FTP not downloading symlinked files... I know what the problem is, and I have fixed it so that I solves my needs - but would like to make a better fix for it... Here is my confusion... Once there was an object named FTPFile... It represented a file on an FTP server. It had four calls that are relevant here... isFile() - returns true if the object represents a file isDirectory() - returns true if the objected represents a directory isSymbolicLink() - returns true if the object is really a symbolic link getLinkName() - or something similar - it eludes me right now... Returns what a symlink points too... Okay, here is what happens... If a listing on an FTP is a symlink it returns false for isFile and isDirectory which is why the current code skips any symlinks it finds. I posted a work around for that in the bug report. All we need to do is check to see if it is a symlink and process the includes and excludes the normal way. Now the problem. I cannot figure out a way to tell if the symlink points to a file or a directory. I think the behavior should follow the normal ANT behavior and not worry if it's a symlink. But there seems to be no way to cleanly do this... For example, if have a symlinked entry and I call the getLinkName() it will return something like: /www/logs/explosivo-access-log Or /www/explosivo Now there is no way to tell heuristically which is a file and which is a directory... My first thought was to do another FTP scan to the area it is pointing to and see if it is a file or directory, but in my case I cannot do listings on the destination directory so that is not a clean fix. I went in with command line ftp and poked and prodded but cannot find a way to tell them apart... The file permissions are all the same and stuff... Anyone have any ideas? William B Chmura Director of Internet Technology Explosivo Internet Technology Group http://www.Explosivo.com Tel: (888) 560-YWEB -- To unsubscribe, e-mail: For additional commands, e-mail: -- To unsubscribe, e-mail: For additional commands, e-mail: