maven-wagon-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tryg...@apache.org
Subject svn commit: r360284 - /maven/wagon/trunk/wagon-providers/wagon-file/src/main/java/org/apache/maven/wagon/providers/file/FileWagon.java
Date Sat, 31 Dec 2005 14:48:18 GMT
Author: trygvis
Date: Sat Dec 31 06:47:45 2005
New Revision: 360284

URL: http://svn.apache.org/viewcvs?rev=360284&view=rev
Log:
o Adding a check to make sure that the parent directories actually was created.
  (Stupid File.mkdirs() that won't throw an IOException if the creation failed)

Modified:
    maven/wagon/trunk/wagon-providers/wagon-file/src/main/java/org/apache/maven/wagon/providers/file/FileWagon.java

Modified: maven/wagon/trunk/wagon-providers/wagon-file/src/main/java/org/apache/maven/wagon/providers/file/FileWagon.java
URL: http://svn.apache.org/viewcvs/maven/wagon/trunk/wagon-providers/wagon-file/src/main/java/org/apache/maven/wagon/providers/file/FileWagon.java?rev=360284&r1=360283&r2=360284&view=diff
==============================================================================
--- maven/wagon/trunk/wagon-providers/wagon-file/src/main/java/org/apache/maven/wagon/providers/file/FileWagon.java
(original)
+++ maven/wagon/trunk/wagon-providers/wagon-file/src/main/java/org/apache/maven/wagon/providers/file/FileWagon.java
Sat Dec 31 06:47:45 2005
@@ -43,8 +43,6 @@
 public class FileWagon
     extends StreamWagon
 {
-
-    // get
     public void fillInputData( InputData inputData )
         throws TransferFailedException, ResourceDoesNotExistException
     {
@@ -74,7 +72,6 @@
         }
     }
 
-    // put
     public void fillOutputData( OutputData outputData )
         throws TransferFailedException
     {
@@ -110,7 +107,11 @@
         destinationDirectory = StringUtils.replace( destinationDirectory, "\\", "/" );
 
         File path = new File( basedir, destinationDirectory );
-        path.mkdirs();
+
+        if ( !path.mkdirs() )
+        {
+            throw new TransferFailedException( "Could not make directory '" + path.getAbsolutePath()
+ "'." );
+        }
 
         try
         {



---------------------------------------------------------------------
To unsubscribe, e-mail: wagon-commits-unsubscribe@maven.apache.org
For additional commands, e-mail: wagon-commits-help@maven.apache.org


Mime
View raw message