Return-Path: Delivered-To: apmail-cocoon-users-archive@www.apache.org Received: (qmail 36750 invoked from network); 5 Nov 2003 19:35:07 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 5 Nov 2003 19:35:07 -0000 Received: (qmail 1134 invoked by uid 500); 5 Nov 2003 19:34:22 -0000 Delivered-To: apmail-cocoon-users-archive@cocoon.apache.org Received: (qmail 1114 invoked by uid 500); 5 Nov 2003 19:34:22 -0000 Mailing-List: contact users-help@cocoon.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: list-post: Reply-To: users@cocoon.apache.org Delivered-To: mailing list users@cocoon.apache.org Received: (qmail 1078 invoked from network); 5 Nov 2003 19:34:21 -0000 Received: from unknown (HELO naomi.webworks.nl) (24.132.161.79) by daedalus.apache.org with SMTP; 5 Nov 2003 19:34:21 -0000 X-MimeOLE: Produced By Microsoft Exchange V6.0.6249.0 content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----_=_NextPart_001_01C3A3D3.D1D95FCF" Subject: RE: Why doesn't delete the SourceWritingTransformer non-empty directories?? Date: Wed, 5 Nov 2003 20:34:25 +0100 Message-ID: <84F0A43A4248CE45B5C0E20F4C40779C36CC82@naomi.webworks.nl> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: Why doesn't delete the SourceWritingTransformer non-empty directories?? Thread-Index: AcOjfbRj8rvHgdfWSiKDV9WdQNjXjgAVfHBg From: "Unico Hommes" To: X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N ------_=_NextPart_001_01C3A3D3.D1D95FCF Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable This is an avalon issue, please file a bug report via their avalon-excalibur bugzilla account.=20 =20 Thanks, Unico =20 -----Original Message----- From: David Geleyn [mailto:david_cocoon@yahoo.co.uk]=20 Sent: woensdag 5 november 2003 10:18 To: users@cocoon.apache.org Subject: Why doesn't delete the SourceWritingTransformer non-empty directories?? =09 =09 Hi all, =20 I'm trying to delete a non-empty directory with the source writing transformer. This results in "Could not delete blahblah (unknown reason)".=20 =20 I took the liberty to search for the cause of this. The FileSource class from the excalibur source classes is used (via ModifiableSource in SourceWritingTransformer). The delete function of this class is called. This function uses the File.delete function (which doesn't delete non-empty directories). This is standard java behaviour, I assume? Shouldn't FileSource check whether the source is a directory and act properly? Examples of recursive deletes of directories can be found on the internet: http://javaalmanac.com/egs/java.io/DeleteDir.html?l=3Drel. =20 I realize that I can work around with a DirectoryGenerator, but when the directory to delete is determined by some request parameters, it becomes too complicated (imo). =20 I'm going to use XSP/action/... now to delete that directory recursively... =20 Thanks! =20 David Geleyn =20 PS: I apologize if you get this mail for the second time, but there was a problem with the first one. Not everybody received it. =09 _____ =20 Want to chat instantly with your online friends? Get the FREE Yahoo! Messenger =20 ------_=_NextPart_001_01C3A3D3.D1D95FCF Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Message
This=20 is an avalon issue, please file a bug report via their=20 avalon-excalibur bugzilla account.
 
Thanks, Unico
 
-----Original Message-----
From: = David Geleyn=20 [mailto:david_cocoon@yahoo.co.uk]
Sent: woensdag 5 november = 2003=20 10:18
To: users@cocoon.apache.org
Subject: Why = doesn't=20 delete the SourceWritingTransformer non-empty=20 directories??

Hi all,
 
I'm trying to delete a non-empty directory with the source = writing=20 transformer. This results in "Could not delete blahblah (unknown = reason)".=20
 
I took the liberty to search for the cause of this. The = FileSource=20 class from the excalibur source classes is used (via = ModifiableSource in=20 SourceWritingTransformer). The delete function of this class is = called. This=20 function uses the File.delete function (which doesn't delete non-empty = directories). This is standard java behaviour, I assume? Shouldn't = FileSource=20 check whether the source is a directory and act properly? Examples of=20 recursive deletes of directories can be found on the internet: http://javaalmanac.com/egs/java.io/DeleteDir.html?l=3Drel= .
 
I realize that I can work around with a DirectoryGenerator, but = when the=20 directory to delete is determined by some request parameters, it = becomes too=20 complicated (imo).
 
I'm going to use XSP/action/... now to delete that directory=20 recursively...
 
Thanks!
 
David Geleyn
 
PS: I apologize if you get this mail for the second time, but = there was a=20 problem with the first one. Not everybody received it.


Want to chat instantly with your online=20 friends? Get=20 the FREE Yahoo! Messenger =00 ------_=_NextPart_001_01C3A3D3.D1D95FCF--