Skip to Content.
Sympa Menu

notify-dpml - svn commit: r2141 - development/main/transit/core/handler/src/main/net/dpml/transit/artifact

notify-dpml AT lists.ibiblio.org

Subject: DPML Notify

List archive

Chronological Thread  
  • From: niclas AT hedhman.org
  • To: notify-dpml AT lists.ibiblio.org
  • Subject: svn commit: r2141 - development/main/transit/core/handler/src/main/net/dpml/transit/artifact
  • Date: Fri, 25 Mar 2005 21:21:08 -0500

Author: niclas AT hedhman.org
Date: Fri Mar 25 21:21:07 2005
New Revision: 2141

Modified:

development/main/transit/core/handler/src/main/net/dpml/transit/artifact/ArtifactURLConnection.java
(contents, props changed)
Log:
Can't have temporary files for artifacts, since Magic need to differentiate
them.

Modified:
development/main/transit/core/handler/src/main/net/dpml/transit/artifact/ArtifactURLConnection.java
==============================================================================
---
development/main/transit/core/handler/src/main/net/dpml/transit/artifact/ArtifactURLConnection.java
(original)
+++
development/main/transit/core/handler/src/main/net/dpml/transit/artifact/ArtifactURLConnection.java
Fri Mar 25 21:21:07 2005
@@ -29,6 +29,12 @@
import java.net.URISyntaxException;

import net.dpml.transit.Transit;
+import net.dpml.transit.SecuredTransitContext;
+import net.dpml.transit.layout.ClassicResolver;
+import net.dpml.transit.layout.LocationResolver;
+import net.dpml.transit.util.MimeTypeHandler;
+import net.dpml.transit.util.StreamUtils;
+import net.dpml.transit.cache.CacheHandler;

/**
* Artifact URL protocol connection processor.
@@ -185,13 +191,12 @@
LocationResolver resolver = new ClassicResolver();
String name = resolver.resolvePath( m_artifact );
File tempDir = new File( Transit.DPML_DATA, "temp" );
- File destDir = new File( tempDir, name );
- destDir.mkdirs();
- File tempFile = File.createTempFile( "dpml", ".tmp", destDir
);
- tempFile.deleteOnExit();
- FileOutputStream output = new FileOutputStream( tempFile );
+ File destFile = new File( tempDir, name );
+ if( destFile.exists() )
+ return destFile;
+ FileOutputStream output = new FileOutputStream( destFile );
StreamUtils.copyStream( content, output, true );
- return tempFile;
+ return destFile;
}
}
return null;



  • svn commit: r2141 - development/main/transit/core/handler/src/main/net/dpml/transit/artifact, niclas, 03/25/2005

Archive powered by MHonArc 2.6.24.

Top of Page