mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
ALF-510 : errorOnOverwrite not implemented for overwriting files.
- now overwriting a file does result in an error if there is a pre-existing file. - also fixed deployment report to have the stack trace even if there is a deployment report. git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@19824 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -534,6 +534,7 @@ public class AVMDeployWebsiteAction extends ActionExecuterAbstractBase
|
||||
|
||||
if (report == null)
|
||||
{
|
||||
// There is no report
|
||||
if (error == null)
|
||||
{
|
||||
writer.putContent("");
|
||||
@@ -549,7 +550,7 @@ public class AVMDeployWebsiteAction extends ActionExecuterAbstractBase
|
||||
}
|
||||
else
|
||||
{
|
||||
// TODO: revisit this, is it better to stream to a temp file?
|
||||
// There is a deployment report
|
||||
StringBuilder builder = new StringBuilder();
|
||||
for (DeploymentEvent event : report)
|
||||
{
|
||||
@@ -559,6 +560,18 @@ public class AVMDeployWebsiteAction extends ActionExecuterAbstractBase
|
||||
builder.append("\r\n");
|
||||
}
|
||||
|
||||
if(error != null)
|
||||
{
|
||||
builder.append("\r\n");
|
||||
|
||||
// add the full stack trace of the error as the content
|
||||
StringWriter stack = new StringWriter();
|
||||
PrintWriter stackPrint = new PrintWriter(stack);
|
||||
error.printStackTrace(stackPrint);
|
||||
|
||||
builder.append(stack.toString());
|
||||
}
|
||||
|
||||
writer.putContent(builder.toString());
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user