tdraier 2005/10/12 13:13:54 CEST
Modified files:
core/src/java/org/jahia/services/importexport
ImportExportBaseService.java
Log:
fix import with files
Revision Changes Path
1.32 +5 -23
jahia/core/src/java/org/jahia/services/importexport/ImportExportBaseService.java
http://jahia.mine.nu:8080/cgi-bin/cvsweb.cgi/jahia/core/src/java/org/jahia/services/importexport/ImportExportBaseService.java.diff?r1=1.31&r2=1.32&f=h
Index: ImportExportBaseService.java
===================================================================
RCS file:
/home/cvs/repository/jahia/core/src/java/org/jahia/services/importexport/ImportExportBaseService.java,v
retrieving revision 1.31
retrieving revision 1.32
diff -u -r1.31 -r1.32
--- ImportExportBaseService.java 4 Oct 2005 13:52:39 -0000 1.31
+++ ImportExportBaseService.java 12 Oct 2005 11:13:54 -0000 1.32
@@ -510,31 +510,13 @@
name = "/" + name;
if (zipentry.isDirectory()) {
final String name1 = name;
- transactionTemplate.execute(new
TransactionCallbackWithoutResult() {
- protected void
doInTransactionWithoutResult(TransactionStatus status) {
- try {
- ensureDir(name1, jParams,
jParams.getSite());
- } catch (Throwable e) {
- logger.error("Error", e);
- throw new RuntimeException(e);
- }
- }
- });
+ ensureDir(name1, jParams, jParams.getSite());
} else {
final String name2 = name;
- transactionTemplate.execute(new
TransactionCallbackWithoutResult() {
- protected void
doInTransactionWithoutResult(TransactionStatus status) {
- try {
- DAVFileAccess dir =
ensureDir(name2.substring(0, name2.lastIndexOf('/')), jParams,
jParams.getSite());
- String filename =
name2.substring(name2.lastIndexOf('/') + 1);
- String contentType = ((ParamBean)
jParams).getContext().getMimeType(filename);
- dir.uploadFile(filename, zis,
contentType, ((ParamBean) jParams).getRequest());
- } catch (Throwable e) {
- logger.error("Error", e);
- throw new RuntimeException(e);
- }
- }
- });
+ DAVFileAccess dir = ensureDir(name2.substring(0,
name2.lastIndexOf('/')), jParams, jParams.getSite());
+ String filename =
name2.substring(name2.lastIndexOf('/') + 1);
+ String contentType = ((ParamBean)
jParams).getContext().getMimeType(filename);
+ dir.uploadFile(filename, zis, contentType,
((ParamBean) jParams).getRequest());
}
} else {
OutputStream os = new ByteArrayOutputStream();