From ant-dev-return-17531-apmail-jakarta-ant-dev-archive=jakarta.apache.org@jakarta.apache.org Tue Sep 11 12:54:35 2001 Return-Path: Delivered-To: apmail-jakarta-ant-dev-archive@jakarta.apache.org Received: (qmail 48210 invoked by uid 500); 11 Sep 2001 12:54:35 -0000 Mailing-List: contact ant-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk Reply-To: ant-dev@jakarta.apache.org list-help: list-unsubscribe: list-post: Delivered-To: mailing list ant-dev@jakarta.apache.org Received: (qmail 48200 invoked from network); 11 Sep 2001 12:54:34 -0000 Date: Tue, 11 Sep 2001 08:54:27 -0400 From: Cavaleiro@netscape.net (Edson Alves Pereira) To: ant-dev@jakarta.apache.org Subject: RE: Re: Ant and FileSystem Message-ID: <74AA90D1.06A54C1E.02250412@netscape.net> X-Mailer: Atlas Mailer 1.0 Content-Type: text/plain; charset=iso-8859-1 X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N Hello folks, iīve just testing Ant1.4Beta2 and this kind of error donīt happen anymore. With best wishes, Edson Alves Pereira Stefan Bodewig wrote: >On Tue, 04 Sep 2001, Alejandro Abdelnur >wrote: > >> i've run into a similar problem in the ant's antfile, the problem >> appears to be a bug in the java.io.File.isAbsolute() method in the >> windows platform. > >Judging from your patch I assume that you think File.isAbsolute() >should return true for \temp on Windows, right? > >>From the javadocs of File: > >>> An absolute pathname is complete in that no other information is >>> required in order to locate the file that it denotes. > >with this definition, I think you are wrong. > >A completely different issue is whether FileUtils.normalize() should >treat \temp the same way it treats an absolute path (it does) - I'm >not sure as I cannot really see all consequences here. > >In which situation would a Windows user (I'm not part of that >community, so I don't really know) use \temp instead of C:\temp? > >> i think the place to add this workaround is the >> FileUtils.normalize() method, > >I think it already treats paths starting with File.separator as >absolute paths. Looks as if should use >FileUtils.resolveFile(dir, antfile) in its execute method. > >> then the ant.setAntfile() method should be retrofitted to use the >> normalized (similarly any other attribute that expects a file name). > >Most tasks have setters that expect a File argument when they expect >filenames - these setters will receive File instances that went >through FileUtils.normalize (via FileUtils.resolveFile) automatically. > >Stefan > -- //////////////////////////////////////// Well done is better than well said //////////////////////////////////////// __________________________________________________________________ Your favorite stores, helpful shopping tools and great gift ideas. Experience the convenience of buying online with Shop@Netscape! http://shopnow.netscape.com/ Get your own FREE, personal Netscape Mail account today at http://webmail.netscape.com/