Return-Path: Delivered-To: apmail-ant-notifications-archive@minotaur.apache.org Received: (qmail 8946 invoked from network); 2 Feb 2010 22:28:24 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 2 Feb 2010 22:28:24 -0000 Received: (qmail 32791 invoked by uid 500); 2 Feb 2010 22:28:24 -0000 Delivered-To: apmail-ant-notifications-archive@ant.apache.org Received: (qmail 32730 invoked by uid 500); 2 Feb 2010 22:28:24 -0000 Mailing-List: contact notifications-help@ant.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@ant.apache.org Delivered-To: mailing list notifications@ant.apache.org Received: (qmail 32721 invoked by uid 99); 2 Feb 2010 22:28:24 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 02 Feb 2010 22:28:24 +0000 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.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 02 Feb 2010 22:28:21 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id CC20A2388A02; Tue, 2 Feb 2010 22:28:00 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r905823 - in /ant/ivy/core/trunk: CHANGES.txt src/java/org/apache/ivy/util/FileUtil.java Date: Tue, 02 Feb 2010 22:28:00 -0000 To: notifications@ant.apache.org From: maartenc@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20100202222800.CC20A2388A02@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: maartenc Date: Tue Feb 2 22:28:00 2010 New Revision: 905823 URL: http://svn.apache.org/viewvc?rev=905823&view=rev Log: FIX: Creation of symlinks problematic in Windows with Cygwin 1.7 (IVY-1165) Modified: ant/ivy/core/trunk/CHANGES.txt ant/ivy/core/trunk/src/java/org/apache/ivy/util/FileUtil.java Modified: ant/ivy/core/trunk/CHANGES.txt URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/CHANGES.txt?rev=905823&r1=905822&r2=905823&view=diff ============================================================================== --- ant/ivy/core/trunk/CHANGES.txt (original) +++ ant/ivy/core/trunk/CHANGES.txt Tue Feb 2 22:28:00 2010 @@ -107,6 +107,7 @@ - IMPROVEMENT: Trace a message when a property file referenced from the settings doesn't exixts (IVY-1074) - IMPROVEMENT: use defaultconf in combination with defaultconfmapping (IVY-1135) (thanks to Jon Schneider) +- FIX: Creation of symlinks problematic in Windows with Cygwin 1.7 (IVY-1165) - FIX: add ability to programmatically change default resolver (IVY-1163) (thanks to Jason Trump) - FIX: ivy.settings.dir space escaping problem (IVY-1162) - FIX: Ivy cannot parse alternate format for Maven MD5 files (IVY-1155) Modified: ant/ivy/core/trunk/src/java/org/apache/ivy/util/FileUtil.java URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/src/java/org/apache/ivy/util/FileUtil.java?rev=905823&r1=905822&r2=905823&view=diff ============================================================================== --- ant/ivy/core/trunk/src/java/org/apache/ivy/util/FileUtil.java (original) +++ ant/ivy/core/trunk/src/java/org/apache/ivy/util/FileUtil.java Tue Feb 2 22:28:00 2010 @@ -86,8 +86,16 @@ throw new IOException("error symlinking " + src + " to " + dest + ":\n" + error); } + + // check if the creation of the symbolic link was successful if (!dest.exists()) { - throw new IOException("error symlinking " + dest + " doesn't exists"); + throw new IOException("error symlinking: " + dest + " doesn't exists"); + } + + // check if the result is a true symbolic link + if (dest.getAbsolutePath().equals(dest.getCanonicalPath())) { + overwrite = true; // just make sure we do overwrite the invalid symlink! + throw new IOException("error symlinking: " + dest + " isn't a symlink"); } } catch (IOException x) { Message.verbose("symlink failed; falling back to copy");