In org.apache.felix.karaf.admin.internal.InstanceImpl.deleteFile() it
does a recursive delete.
However, it only tests for isDirectory() which is true for links to
directories.
e.g. a link to root would attempt to delete everything it can. ;)

Apache's FileUtils.isSymlink() does a check and in fact using
FileUtils.deleteDirectory() would fix the problem. Perhaps this is a
better choice.

I will add this to a Jira.

-----Original Message-----
From: Guillaume Nodet [mailto:[email protected]] 
Sent: 16 November 2009 15:02
To: [email protected]
Subject: Re: Deleting an instance.

Could you please raise a JIRA for that ?
If you have any idea how to fix this issue, that would be welcomed!

On Mon, Nov 16, 2009 at 12:40, peter lawrey <[email protected]>
wrote:
> When you delete an instance of karaf, it does an aggressive delete
which
> follows symbolic links. (Unlike rm -rf)
>
> i.e. if etc and deploy are linked to another location, they are
deleted
> too.
>
>
>
> Peter.
>
>



-- 
Cheers,
Guillaume Nodet
------------------------
Blog: http://gnodet.blogspot.com/
------------------------
Open Source SOA
http://fusesource.com

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to