Bugs item #1666783, was opened at 2007-02-22 22:02 Message generated for change (Comment added) made by tomfaust You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=402868&aid=1666783&group_id=31650
Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Functions Group: None Status: Closed Resolution: Invalid Priority: 5 Private: No Submitted By: Tushar K (tusharkesare) Assigned to: Gert Driesen (drieseng) Summary: file::exists() fails Initial Comment: Hi, I am using svn 1.4.2 setup. file::exists() function is not working properly. It always returns false irrespective of existence of file. Can someone pls verify it?? Thanks, Tushar ---------------------------------------------------------------------- Comment By: Tom Faust (tomfaust) Date: 2008-09-05 14:34 Message: Logged In: YES user_id=2206089 Originator: NO It appear you are using file::exists() incorrectly. You have <if test="${file::exists('${filepath}')}"> where it should be <if test="${file::exists(filepath)}"> Since filepath is a property and is already inside a ${}, just use the name directly without quotes. ---------------------------------------------------------------------- Comment By: rafpalm (rafpalm) Date: 2007-03-23 00:59 Message: Logged In: YES user_id=1747363 Originator: NO Very thanks, now it is working to me also. ---------------------------------------------------------------------- Comment By: Tushar K (tusharkesare) Date: 2007-03-22 22:28 Message: Logged In: YES user_id=1726760 Originator: YES Thanks. It is working. ---------------------------------------------------------------------- Comment By: Gert Driesen (drieseng) Date: 2007-03-19 08:13 Message: Logged In: YES user_id=707851 Originator: NO There's no buglet here (except for perhaps a lack of documentation). In functions, properties should not be enclosed in '${...}' if you want to use their expanded value. Use this: <if test="${file::exists(filepath)}"> ... </if> instead of: <if test="${file::exists('${filepath}')}"> ... </if> ---------------------------------------------------------------------- Comment By: rafpalm (rafpalm) Date: 2007-03-19 07:30 Message: Logged In: YES user_id=1747363 Originator: NO I have found also this problem file::exists() function is not working properly. It always returns false irrespective of existence of file. Is it verified by someone? thanks, Raffaele. ---------------------------------------------------------------------- Comment By: Martin Aliger (maliger) Date: 2007-02-26 01:05 Message: Logged In: YES user_id=655297 Originator: NO I'm using file::exists alot in my production scripts and never had a problem with it. We are using svn 1.4.3 btw - but don't think it could somehow influence the file:exists function. ---------------------------------------------------------------------- Comment By: Tushar K (tusharkesare) Date: 2007-02-25 21:11 Message: Logged In: YES user_id=1726760 Originator: YES Hi, Thanx for reply. Here is code I am using: <target name="build"> <property name="filepath" value="c:\mallow.exe"/> <echo message="${filepath}"/> <if test="${file::exists('${filepath}')}"> <echo message="File Exists"/> </if> <if test="${not file::exists('${filepath}')}"> <echo message="File does not Exist"/> </if> </target> In any case it prints, "File does not Exist". Version of NAnt.Core.dll present is 0.85.2478.0 I am not able to figure out what is wrong. Thanx, Tushar ---------------------------------------------------------------------- Comment By: Gert Driesen (drieseng) Date: 2007-02-25 12:00 Message: Logged In: YES user_id=707851 Originator: NO svn 1.4.2 ? It working just fine here. Do you have a simple repro that you can share ? ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=402868&aid=1666783&group_id=31650 ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ nant-developers mailing list nant-developers@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nant-developers