Return-Path: Delivered-To: apmail-commons-issues-archive@locus.apache.org Received: (qmail 87566 invoked from network); 11 Aug 2008 11:32:40 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 11 Aug 2008 11:32:40 -0000 Received: (qmail 73234 invoked by uid 500); 11 Aug 2008 11:32:39 -0000 Delivered-To: apmail-commons-issues-archive@commons.apache.org Received: (qmail 73146 invoked by uid 500); 11 Aug 2008 11:32:38 -0000 Mailing-List: contact issues-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: issues@commons.apache.org Delivered-To: mailing list issues@commons.apache.org Received: (qmail 73135 invoked by uid 99); 11 Aug 2008 11:32:38 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 11 Aug 2008 04:32:38 -0700 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 11 Aug 2008 11:31:50 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id A9E8B234C1A4 for ; Mon, 11 Aug 2008 04:31:48 -0700 (PDT) Message-ID: <755725300.1218454308694.JavaMail.jira@brutus> Date: Mon, 11 Aug 2008 04:31:48 -0700 (PDT) From: "Niall Pemberton (JIRA)" To: issues@commons.apache.org Subject: [jira] Commented: (IO-168) Symbolic links (symlinks) followed when deleting directory. In-Reply-To: <991522800.1210007035654.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/IO-168?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12621413#action_12621413 ] Niall Pemberton commented on IO-168: ------------------------------------ Brydie, thanks for the patch and Attila for the solution. I have applied a slightly modified form, which includes null checks - which if you could run the tests would be great because I'm on windows :( http://svn.apache.org/viewvc?view=rev&revision=684715 http://svn.apache.org/viewvc?view=rev&revision=684716 > Symbolic links (symlinks) followed when deleting directory. > ----------------------------------------------------------- > > Key: IO-168 > URL: https://issues.apache.org/jira/browse/IO-168 > Project: Commons IO > Issue Type: Bug > Components: Utilities > Affects Versions: 1.4 > Environment: Linux only (symlinks required for bug to manifest) > Reporter: Apostolos Lerios > Attachments: symlinkFix.patch > > > If 'dlink' is a symbolic link to a directory 'dir', and FileUtils.forceDelete is called on dlink, then here is what happens: > 1) the contents of 'dir' are emptied (the link is followed). > 2) 'dir' continues to exist (but is empty). > 3) 'dlink' is removed. > The correct behavior is to simply remove 'dlink' without following it and thus without altering the contents of 'dir' (or 'dir' itself). -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.