You are viewing a plain text version of this content. The canonical link for it is here.
Posted to wagon-commits@maven.apache.org by mi...@apache.org on 2004/06/19 23:48:04 UTC
cvs commit: maven-wagon/wagon-providers/http/src/main/java/org/apache/maven/wagon/providers/http HttpWagon.java
michal 2004/06/19 14:48:04
Modified: wagon-providers/http/src/main/java/org/apache/maven/wagon/providers/http
HttpWagon.java
Log:
required dirs are created now
Revision Changes Path
1.9 +18 -1 maven-wagon/wagon-providers/http/src/main/java/org/apache/maven/wagon/providers/http/HttpWagon.java
Index: HttpWagon.java
===================================================================
RCS file: /home/cvs/maven-wagon/wagon-providers/http/src/main/java/org/apache/maven/wagon/providers/http/HttpWagon.java,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- HttpWagon.java 3 Jun 2004 18:31:26 -0000 1.8
+++ HttpWagon.java 19 Jun 2004 21:48:04 -0000 1.9
@@ -285,6 +285,23 @@
InputStream is = null;
+
+ File dir = destination.getParentFile();
+
+ if ( dir != null && !dir.exists() )
+ {
+ if ( ! dir.mkdirs() )
+ {
+
+ String msg = "Some of the required local directories do not exist and could not be created. " +
+ "Requested local path: " + destination.getAbsolutePath();
+
+ throw new TransferFailedException( msg );
+ }
+
+ }
+
+
try
{
os = new LazyFileOutputStream( destination );
---------------------------------------------------------------------
To unsubscribe, e-mail: wagon-cvs-unsubscribe@maven.apache.org
For additional commands, e-mail: wagon-cvs-help@maven.apache.org