Thanks, that's shorter the using <if> <not> <isset> but it seems harder to read/maintain though.
Are there any plans to change the behavior of loadfile (empty file -> empty string, missing file -> unset property)? Sten > -----Original Message----- > From: Dominique Devienne [mailto:[EMAIL PROTECTED]] > Sent: Monday, December 16, 2002 4:05 PM > To: 'Ant Users List' > Subject: RE: loadfile fails on empty file > > > Just do: > > <loadfile property="xyz" ... /> > <property name="xyz" value="" /> > > The latter will be ignore if xyz was already set by loadfile. --DD > > -----Original Message----- > From: Rosendahl Sten - stro [mailto:[EMAIL PROTECTED]] > Sent: Monday, December 16, 2002 6:52 AM > To: 'Ant Users List' > Subject: loadfile fails on empty file > > I use loadfile to fetch a list of files filtered by > replaceregexp. When the list (and file) is empty, the > loadfile task will silently *not* set the output property > causing an error in the next task. Is there a way of setting > it the the empty string, or do I have to test if the property > is set or not? > > Sten Rosendahl ([EMAIL PROTECTED]) > IMI Industri-Matematik International - THE ORDER COMPANY >
