maven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From krosenv...@apache.org
Subject svn commit: r1631508 - /maven/plugins/trunk/maven-clean-plugin/src/main/java/org/apache/maven/plugin/clean/Cleaner.java
Date Mon, 13 Oct 2014 18:45:38 GMT
Author: krosenvold
Date: Mon Oct 13 18:45:38 2014
New Revision: 1631508

URL: http://svn.apache.org/r1631508
Log:
[MCLEAN-58] Use better symlink support

Modified:
    maven/plugins/trunk/maven-clean-plugin/src/main/java/org/apache/maven/plugin/clean/Cleaner.java

Modified: maven/plugins/trunk/maven-clean-plugin/src/main/java/org/apache/maven/plugin/clean/Cleaner.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-clean-plugin/src/main/java/org/apache/maven/plugin/clean/Cleaner.java?rev=1631508&r1=1631507&r2=1631508&view=diff
==============================================================================
--- maven/plugins/trunk/maven-clean-plugin/src/main/java/org/apache/maven/plugin/clean/Cleaner.java
(original)
+++ maven/plugins/trunk/maven-clean-plugin/src/main/java/org/apache/maven/plugin/clean/Cleaner.java
Mon Oct 13 18:45:38 2014
@@ -24,6 +24,7 @@ import java.io.IOException;
 
 import org.apache.maven.plugin.logging.Log;
 import org.apache.maven.shared.utils.Os;
+import org.apache.maven.shared.utils.io.FileUtils;
 
 /**
  * Cleans directories.
@@ -144,8 +145,9 @@ class Cleaner
         {
             if ( selector == null || selector.couldHoldSelected( pathname ) )
             {
+                final boolean isSymlink = FileUtils.isSymbolicLink( file );
                 File canonical = followSymlinks ? file : file.getCanonicalFile();
-                if ( followSymlinks || file.equals( canonical ) )
+                if ( followSymlinks || !isSymlink )
                 {
                     String[] filenames = canonical.list();
                     if ( filenames != null )



Mime
View raw message