continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tryg...@apache.org
Subject svn commit: r209660 - /maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/CheckWorkingDirectoryAction.java
Date Thu, 07 Jul 2005 22:04:53 GMT
Author: trygvis
Date: Thu Jul  7 15:04:52 2005
New Revision: 209660

URL: http://svn.apache.org/viewcvs?rev=209660&view=rev
Log:
o A empty working directory is also no good.

Modified:
    maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/CheckWorkingDirectoryAction.java

Modified: maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/CheckWorkingDirectoryAction.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/CheckWorkingDirectoryAction.java?rev=209660&r1=209659&r2=209660&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/CheckWorkingDirectoryAction.java
(original)
+++ maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/CheckWorkingDirectoryAction.java
Thu Jul  7 15:04:52 2005
@@ -35,6 +35,15 @@
 
         File workingDirectory = new File( project.getWorkingDirectory() );
 
-        context.put( KEY_WORKING_DIRECTORY_EXISTS, Boolean.valueOf( workingDirectory.exists()
) );
+        if ( !workingDirectory.exists() )
+        {
+            context.put( KEY_WORKING_DIRECTORY_EXISTS, Boolean.FALSE );
+
+            return;
+        }
+
+        File[] files = workingDirectory.listFiles();
+
+        context.put( KEY_WORKING_DIRECTORY_EXISTS, Boolean.valueOf( files.length > 0 )
);
     }
 }



Mime
View raw message