continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From eveni...@apache.org
Subject svn commit: r453022 - /maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/configuration/DefaultConfigurationService.java
Date Wed, 04 Oct 2006 21:00:16 GMT
Author: evenisse
Date: Wed Oct  4 14:00:15 2006
New Revision: 453022

URL: http://svn.apache.org/viewvc?view=rev&rev=453022
Log:
Use canonical paths

Modified:
    maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/configuration/DefaultConfigurationService.java

Modified: maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/configuration/DefaultConfigurationService.java
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/configuration/DefaultConfigurationService.java?view=diff&rev=453022&r1=453021&r2=453022
==============================================================================
--- maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/configuration/DefaultConfigurationService.java
(original)
+++ maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/configuration/DefaultConfigurationService.java
Wed Oct  4 14:00:15 2006
@@ -98,7 +98,15 @@
 
     public void setBuildOutputDirectory( File buildOutputDirectory )
     {
-        systemConf.setBuildOutputDirectory( buildOutputDirectory.getAbsolutePath() );
+        File f = buildOutputDirectory;
+        try
+        {
+            f = f.getCanonicalFile();
+        }
+        catch ( IOException e )
+        {
+        }
+        systemConf.setBuildOutputDirectory( f.getAbsolutePath() );
     }
 
     public File getWorkingDirectory()
@@ -108,7 +116,16 @@
 
     public void setWorkingDirectory( File workingDirectory )
     {
-        systemConf.setWorkingDirectory( workingDirectory.getAbsolutePath() );
+        File f = workingDirectory;
+        try
+        {
+            f = f.getCanonicalFile();
+        }
+        catch ( IOException e )
+        {
+        }
+
+        systemConf.setWorkingDirectory( f.getAbsolutePath() );
     }
 
     public File getDeploymentRepositoryDirectory()
@@ -200,6 +217,14 @@
     {
         File dir = new File( getBuildOutputDirectory(), Integer.toString( projectId ) );
 
+        try
+        {
+            dir = dir.getCanonicalFile();
+        }
+        catch ( IOException e )
+        {
+        }
+
         if ( !dir.exists() && !dir.mkdirs() )
         {
             throw new ConfigurationException(
@@ -227,7 +252,14 @@
             }
         }
 
-        return f;
+        try
+        {
+            return f.getCanonicalFile();
+        }
+        catch ( IOException e )
+        {
+            return f;
+        }
     }
 
     // ----------------------------------------------------------------------



Mime
View raw message